asp.net´úÂëÓÅ»¯
ASP.NET´úÂëÓÅ»¯Ò»¡¢Ò³ÃæºÍ·þÎñÆ÷¿Ø¼þ´¦Àí
1¡¢ASP.NET´úÂëÓÅ»¯±ÜÃâµ½·þÎñÆ÷µÄ²»±ØÒªµÄÍù·µÐгÌ
ÔÚijЩÇé¿öϲ»±ØʹÓà ASP.NET ·þÎñÆ÷¿Ø¼þºÍÖ´Ðлط¢Ê¼þ´¦Àí¡£ÀýÈ磬ÔÚ ASP.NET ÍøÒ³ÖÐÑéÖ¤Óû§ÊäÈë¾³£¿ÉÔÚÊý¾ÝÌá½»µ½·þÎñÆ÷֮ǰÔÚ¿Í»§¶Ë½øÐС£Í¨³££¬Èç¹û²»ÐèÒª½«ÐÅÏ¢´«µÝµ½·þÎñÆ÷ÒÔ½øÐÐÑéÖ¤»ò½«ÆäдÈëÊý¾Ý´æ´¢Çø£¬Çë±ÜÃâʹÓõ¼Öµ½·þÎñÆ÷µÄÍù·µÐг̵ĴúÂ룬ÕâÑù¿ÉÒÔÌá¸ßÒ³µÄÐÔÄܲ¢¸ÄÉÆÓû§ÌåÑé¡£ÄúÒ²¿ÉÒÔ²»Ö´ÐÐÕû¸öÍù·µÐг̣¬¶øÊÇʹÓÿͻ§¶Ë»Øµ÷´Ó·þÎñÆ÷ÖжÁÈ¡Êý¾Ý¡£
Ò³ÃæÀàʵÏÖICallbackEventHandler½Ó¿Ú£¬×¢²áGetCallbackEventReference·½·¨£¬Ò²¾ÍÊÇajaxµÄ»Øµ÷ʵÏÖ¡£
Õë¶ÔÒ»´ÎÐèÒªÔØÈëºÜ¶à¿Ø¼þµÄÒ³Ãæ(ÔØÈë±È½ÏºÄʱµÄÒ³Ãæ)£¬ÎÒÃÇ¿ÉÒÔʹÓÃajax¼¼ÊõÀ´´ïµ½Ò»¶¨µÄÒ³Ãæ·ÃÎÊÐÔÄÜÌáÉý¡£
2¡¢ASP.NET´úÂëÓÅ»¯Ê¹Óà Page ¶ÔÏóµÄ IsPostBack ÊôÐÔÀ´±ÜÃâ¶ÔÍù·µÐгÌÖ´Ðв»±ØÒªµÄ´¦Àí
Èç¹ûÄú±àд´¦Àí·þÎñÆ÷¿Ø¼þ»Ø·¢´¦ÀíµÄ´úÂ룬ÓÐʱ¿ÉÄÜÐèÒª´úÂë½öÔÚÊ×´ÎÇëÇóҳʱִÐУ¬¶ø²»ÊÇÿ´Î»Ø·¢Ê±¶¼Ö´ÐС£¸ù¾Ý¸ÃÒ³ÊÇ·ñÊÇÏìÓ¦·þÎñÆ÷¿Ø¼þʼþÉú³ÉµÄ£¬Ê¹Óà IsPostBack ÊôÐÔÓÐÌõ¼þµØÖ´ÐдúÂë¡£
½«½öÐèÒªÊ×´ÎÇëÇóÒ³ÃæʱִÐеĴúÂë·ÅÔÚIsPostBackÌõ¼þÖÐÔËÐС£
3¡¢ASP.NET´úÂëÓÅ»¯Ö»ÔÚ±ØҪʱ±£´æ·þÎñÆ÷¿Ø¼þÊÓͼ״̬
×Ô¶¯ÊÓͼ״̬¹ÜÀíʹ·þÎñÆ÷¿Ø¼þ¿ÉÒÔÔÚÍù·µÐгÌÖÐÖØÐÂÌî³äËüÃǵÄÊôÐÔÖµ£¬¶øÄú²»ÐèÒª±àдÈκδúÂë¡£µ«ÊÇ£¬ÒòΪ·þÎñÆ÷¿Ø¼þµÄÊÓͼ״̬ÔÚÒþ²ØµÄ´°Ìå×Ö¶ÎÖÐÍù·µÓÚ·þÎñÆ÷£¬ËùÒԸù¦ÄÜÓ°ÏìÐÔÄÜ¡£Á˽âÔÚÄÄЩÇé¿öÏÂÊÓͼ״̬»áÓÐËù°ïÖú£¬ÔÚÄÄЩÇé¿öÏÂËüÓ°ÏìÒ³µÄÐÔÄÜ£¬ÕâÑùÊÇÓаïÖúµÄ¡£ÀýÈ磬Èç¹ûÄú½«·þÎñÆ÷¿Ø¼þ°ó¶¨µ½Ã¿¸öÍù·µÐгÌÉϵÄÊý¾Ý£¬ÒòΪ¿Ø¼þµÄÖµ»áÔÚÊý¾Ý°ó¶¨ÆÚ¼äÓÃÐÂÖµÌæ»»£¬ËùÒÔ±£´æµÄÊÓͼ״̬ûÓÐÓô¦¡£ÔÚÕâÖÖÇé¿öÏ£¬½ûÓÃÊÓͼ״̬¿ÉÒÔ½ÚÊ¡´¦Àíʱ¼ä²¢¼õÉÙÒ³µÄ´óС¡£
ĬÈÏÇé¿öÏ£¬ÎªËùÓзþÎñÆ÷¿Ø¼þÆôÓÃÊÓͼ״̬¡£ÈôÒª½ûÓÃËü£¬Ç뽫¿Ø¼þµÄ EnableViewState ÊôÐÔÉèÖÃΪ false¡£
»¹¿ÉÒÔʹÓà @ Page Ö¸Áî½ûÓÃÕû¸öÒ³µÄÊÓͼ״̬¡£µ±Äú²»´ÓÒ³»Ø·¢µ½·þÎñÆ÷ʱ£¬Õ⽫ʮ·ÖÓÐÓá£
@ Control Ö¸ÁîÖл¹Ö§³Ö EnableViewState ÊôÐÔÒÔÖ¸¶¨ÊÇ·ñΪÓû§¿Ø¼þÆôÓÃÊÓͼ״̬¡£
²é¿´ÊÓͼ״̬µÄ·½·¨£º
ÈôÒª·ÖÎö·þÎñÆ÷¿Ø¼þÔÚÒ³ÖÐʹÓõÄÊÓͼ״̬µÄ´óС£¬Çëͨ¹ý½« trace="true" ÊôÐÔ°üº¬ÔÚ @ Page Ö¸ÁîÖÐÆôÓöԸÃÒ³µÄ¸ú×Ù¡£È»ºóÔÚ¸ú×ÙÊä³öÖУ¬²é¿´“¿Ø¼þ²ã´Î½á¹¹”±íµÄ“Viewstate”ÁС£
ÏÂÃæÇé¿ö»ù±¾ÉÏ¿ÉÒÔ½ûÓÃviewstate£º
£¨1£©Ò³Ãæ¿Ø¼þ £¨.ascx£©
£¨2£©Ò³Ãæ²»»Ø´
Ïà¹ØÎĵµ£º
½üÀ´£¬Ëæ×ÅMono2.4ºÍJexus web server 2.3µÄ³É¹¦·¢²¼£¬ÔÚLinux ƽ̨¼ÜÉèAsp.netµÄʱ»úÒѾÍêÈ«³ÉÊì¡£ÓÉÓÚLinux·þÎñÆ÷ϵͳËù¾ß±¸µÄ´óÁ¿µÄÓŵ㣬¿ÉÒÔÔ¤¼Æ£¬¿çƽ̨µÄLinux ASP.NETÍøÕ¾±Ø½«½øÈëÎÒÃǵŤ×÷ÓëÉú²úʵ¼Ê¡£
Ãû´Ê½âÊÍ£º
Ò»¡¢Mono:
MonoÊÇÒ»¸ö¿ªÔ´ÏîÄ¿£¬ÊÇ°´ECMA-335¶¨ÒåµÄ±ê×¼Ö´ÐÐ.NET¿ò¼Ü£¬¼òµ¥µØ˵£¬Mono¾ÍÊÇ ......
<Ò»>Ò³Ã漶µÄ´íÎó´¦Àí
void Page_Error(Object sender, EventArgs e) {
String message = "<font face=verdana color=red>"
......
µÚÒ»Õ ASP.NET Ajax¼ò½é
1.1ʲôÊÇAjax
Ò»£®Ê²Ã´ÊÇAjax
AjaxÊÇAsynchronous JavaScript and XML(Òì²½JavaScript ºÍXML)µÄËõд£¬ÓÉÖøÃûÓû§ÌåÑéר¼ÒJesse-James GarrettÔÚ2005Äê2ÔÂ18ÈÕ·¢±íµÄһƪÃûΪAjax:a New Approach to Web ApplicationsÎÄÕÂÖÐÊ×ÏÈÌá³ö¡£
Ajax²¢²»ÊÇÖ»°üº¬JavaScri ......
Ajax¿ª·¢ÈËÔ±ÐèÒªµÄJavaScript֪ʶ
JavaScriptµ®ÉúÓÚ1995 Ä꣬×î×³ÉÔÚNetsCape Navigatorä¯ÀÀÆ÷ÖС£Microsoft ÔÚIE3Öм¯³É¡£1998Äê±»±ê×¼»¯ÎªECMAScript.
Microsoft Ajax Library¸ÄÉÆÁËJavaScriptµÄÃæÏò¶ÔÏóÄ£ÐÍ¡£
3.1ʹÓöÔÏó
JavaScriptÖеĶÔÏó²¢²»ÊÇÀàÐ͵ÄʵÀý£¬ÒòΪJavaScript²»Ö§³ ......