asp.netÒ³ÃæʼþÖ´ÐÐ˳Ðò¼°¸÷ʼþ×÷ÓÃ
protected void Page_Load(object sender, EventArgs e)
{
}
#region OnPreInit µÚÒ»²½
protected override void OnPreInit(EventArgs e)
{
//¼ì²é IsPostBack ÊôÐÔÀ´È·¶¨ÊDz»ÊǵÚÒ»´Î´¦Àí¸ÃÒ³¡£
//´´½¨»òÖØд´½¨¶¯Ì¬¿Ø¼þ¡£
//¶¯Ì¬ÉèÖÃÖ÷¿ØÒ³¡£
//¶¯Ì¬ÉèÖà Theme ÊôÐÔ¡£
//¶ÁÈ¡»òÉèÖÃÅäÖÃÎļþÊôÐÔÖµ¡£
//×¢Òâ
//Èç¹ûÇëÇóÊǻط¢ÇëÇó£¬Ôò¿Ø¼þµÄÖµÉÐδ´ÓÊÓͼ״̬»¹Ô¡£Èç¹ûÔڴ˽׶ÎÉèÖÿؼþÊôÐÔ£¬ÔòÆäÖµ¿ÉÄÜ»áÔÚÏÂһʼþÖб»ÖØд¡£
base.OnPreInit(e);
}
#endregion
#region OnInit µÚ¶þ²½
protected override void OnInit(EventArgs e)
{
//ÔÚËùÓпؼþ¶¼Òѳõʼ»¯ÇÒÒÑÓ¦ÓÃËùÓÐÍâ¹ÛÉèÖúóÒý·¢¡£Ê¹ÓøÃʼþÀ´¶ÁÈ¡»ò³õʼ»¯¿Ø¼þÊôÐÔ¡£
base.OnInit(e);
}
#endregion
#region OnInitComplete µÚÈý²½
protected override void OnInitComplete(EventArgs e)
{
//ÓÉ Page ¶ÔÏóÒý·¢¡£Ê¹ÓøÃʼþÀ´´¦ÀíÒªÇóÏÈÍê³ÉËùÓгõʼ»¯¹¤×÷µÄÈÎÎñ¡£
base.OnInitComplete(e);
}
#endregion
#region PreLoad µÚËIJ½
protected override void OnPreLoad(EventArgs e)
{
//Èç¹ûÐèÒªÔÚ Load ʼþ֮ǰ¶ÔÒ³»ò¿Ø¼þÖ´Ðд¦Àí£¬ÇëʹÓøÃʼþ¡£
//ÔÚ Page Òý·¢¸
Ïà¹ØÎĵµ£º
ÔÚGlobal.asaxÆô¶¯Ò»ÌõÏ߳̾ÍokÁË£¬ÏÂÃæÊÇÆô¶¯Ï̶߳¨Ê±Ð´ÎļþµÄÀý×Ó
ÔÚGlobal.asax
C# code:
<%@ Application Language="C#" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Threading" %>
<script runat="server">
string LogPath;  ......
asp.net ·¢²¼ÍøվʱÓÐÈý¸öÑ¡Ï
1¡¢ÔÊÐí¸üдËÔ¤±àÒëÕ¾µã£ºasp.net web Ò³Ãæͨ³£°üº¬Á½¸öÒ³Ã棬һ¸ö¼´ .aspx Ò³£¬»¹ÓÐÒ»¸ö .aspx.cs Îļþ£¬ºóÒ»¸öÎļþÊÇ»ù±¾Î¯ÍеÄʼþÏìÓ¦Îļþ´úÂ룻´Ë´¦ÔÊÐí¸üдËÔ¤±àÒëÕ¾µãµÄÒâ˼¾ÍÊÇ£º.aspx Ò³¿É¸ù¾ÝÐèÒª½øÐÐÒ»¶¨µÄ¸üУ¬¶ø .aspx.cs ±àÒë³ÉµÄ .dll ±£³Ö²»±ä£»ÁíÍ⣬Èç¹û·¢²¼Íøվʱֻ ......
/// <summary>
/// ¸ù¾ÝÖ¸¶¨²ÎÊý·µ»ØBitMap¶ÔÏó
/// ÒýÓÃÈçÏ£º
/// using System.Drawing;
/// µ÷ÓÃÀý×ÓÈçÏ£º
......
HttpContext.Current.Request.Url.ToString() ²¢²»¿É¿¿¡£
Èç¹ûµ±Ç°URLΪ
http://localhost/search.aspx?user=http://csharp.xdowns.com&tag=%BC%BC%CA%F5
ͨ¹ýHttpContext.Current.Request.Url.ToString()»ñÈ¡µ½µÄÈ´ÊÇ
http://localhost/search.aspxuser=http://csharp.xdowns.com&tag=¼&fra ......