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 Òý·¢¸
Ïà¹ØÎĵµ£º
½ñÔçÓиöÍøÓÑÎʵ½ÎÒÕâÎÊÌ⣬ÒÔÇ°ÎÒ¶¼ÊÇÖ±½ÓÔÚÊý¾Ý¿âÖдæÎļþÃûµÄ£¬»¹Ã»ÓÐÊÔ¹ý´æ´¢ÕûÕÅͼƬµ½Êý¾Ý¿âÖУ¬ÉÏÍøËÑË÷ÁËһϣ¬×Ô¼ºÓÖ²âÊÔÁËÒ»·¬£¬´úÂëÈçÏ£º
½¨Á¢±£´æͼƬµÄ±íµÄSQLÓï¾ä£º
Sql´úÂë < width="14" height="15" src="javascripts/syntaxhighlighter/clipboard_new.swf" pluginspage="http://w ......
1.Asp.NetÖм¸ÖÖÏàËƵıê¼Ç·ûºÅ: < %=...%>< %#... %>< % %>< %@ %>½âÊͼ°Ó÷¨
´ð: < %#... %>: ÊÇÔڰ󶨿ؼþDataBind()·½·¨Ö´ÐÐʱ±»Ö´ÐУ¬ÓÃÓÚÊý¾Ý°ó¶¨
Èç: < %# Container.DataItem("tit") %>
< %= %>: ÔÚ³ÌÐòÖ´ÐÐʱ±»µ÷Ó㬿ÉÒÔÏÔʾºǫ́±äÁ¿Öµ
Èç:
*.aspxÖУº < %= a ......
֮ǰÓõÄÔÚÏß±à¼Æ÷ÊÇDotNetTextBox £¬²¢ÇÒÔøÒ»¶È¾õµÃËüÒ쳣ǿ´ó£¬Èç¿ÉÒÔ¸øÉÏ´«µÄͼƬ¼ÓÎÄ×Öˮӡ»òÕßͼƬˮӡ£¬µ«ºóÀ´·¢ÏÖÆäÉÏ´«µÄͼƬ²»ÈÝÒ×¹ÜÀí£¬¶¼¼·ÔÚÒ»¸öÎļþ¼ÐÀïÃ棨Ãâ·Ñ°æ£¬¸¶·Ñ°æºÃÏñ¿ÉÒÔ·ÖÎļþ¼ÐÉÏ´«±£´æͼƬ£©£¬²¢ÇÒ¶ÎÊ׿ոñ×ܲ»ÊÇËù¼û¼´ËùµÃ£¬ÎÒ±à¼Ê±¿ÕÁËÁ½¸ö×Ö·ûµÄλÖ㬵½ÁËǰ̨ҳÃæµÄʱºòÖ»ÓÐÒ»¸ö×Ö·û£¬ËùÒÔ ......
ÒÔÏÂÊÇϵͳ×Ô¶¯Éú³ÉµÄ»Øµ÷º¯Êý
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['Form1'];
if (!theForm) {
theForm = document.Form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.ons ......