ASP.NET ÖпؼþµÄEnableViewState
ÔÚASP.NetÖжԸ÷¸öWebForm¿Ø¼þÒýÈëÒÔǰûÓеÄEnableViewStateÊôÐÔ¡£Õâ¸öÊôÐÔ¾¿¾¹ÓÐʲôÓá£ÎÒÃÇÖªµÀ¶ÔÓÚWebForm¶øÑÔ£¬Æä´úÂëÊÇÔÚ·þÎñÆ÷¶ËµÄ£¬ÒÔ´¦Àí¿Í»§¶ËµÄÇëÇó¡£µ±Óû§Í¨¹ýä¯ÀÀÆ÷ä¯ÀÀÍøÒ³µÄʱºò£¬»á¶ÔÍøÒ³½øÐÐijЩ²Ù×÷£¬±ÈÈç´ò¿ªÐÂÁ´½Ó£¬»òµ¥»÷ij¸ö°´Å¥¡£ÔÚASPÖУ¬ÕâЩÊÇͨ¹ý½Å±¾ÓïÑÔ¶ÔÆä½øÐд¦Àí£¬Ö®ºóÔÙ´«µÝ¸ø·þÎñÆ÷¶Ë¡£µ«ÊÇÔÚASP.NETÏ£¬ÓÉÓÚ²ÉÓÃÁËcode behind¼¼Êõ£¬ÔÚcodingµÄʱºò£¬Í¨³£Êǽ«ÒÔÇ°¿Í»§¶ËÍê³ÉµÄ¹¤×÷·Åµ½ÁË·þÎñÆ÷¶Ë¡£
ÄÇô£¬·þÎñÆ÷ÊÇÔõô֪µÀ¿Í»§µÄ²Ù×÷µÄÄØ£¿±ÈÈçÎÒÔÚÎı¾¿òÊäÈëµÄÄÚÈÝ£¬»òÕßµ¥»÷Á˵Ǽ°´Å¥£¬·þÎñÆ÷¶ËÊÇÔõÑùµÃµ½ÕâЩÐÅÏ¢µÄÄØ£¿ÒòΪûÓÐÕâЩÐÅÏ¢£¬·þÎñÆ÷¶Ë¾ÍÎÞ·¨ÏìÓ¦¿Í»§µÄÇëÇó¡£ÔÀí¾ÍÊÇASP.NETÒýÓÃÁËviewstateµÄ»úÖÆ¡£ÔÚ·þÎñÆ÷¶Ë±£´æÁËÍøÒ³¸÷¸ö¿Ø¼þ¼°Ò³ÃæµÄ״̬£¬ÕâÆäÖаüÀ¨¸÷¸ö¿Ø¼þÔÚÒ³ÃæÉϵIJ¼¾Ö£¬ºÍËûÃǸ÷×ÔµÄÊôÐÔ¡£ÕâЩֵ¾Í±£´æÔÚViewStateÏ¡£ÎÒÃÇ¿ÉÒÔ¹Û²ìAspxÒ³ÃæµÄhtmlÔ´´úÂ룬¼ÙÉèÕâ¸öÒ³ÃæÉÏÓÐÒ»¸öbutton°´Å¥£¬ºÍÒ»¸ölistBox¿Ø¼þ£¬htmlÎļþÈçÏ£º
<input type="hidden" name="__VIEWSTATE" value="dDwzODYzNDM5NTU7Oz7FvviJbq45bDa7QJaumIiOhZ8mOQ==" />
<input type="submit" name="Button1" value="Button" id="Button1" style="height:40px;width:96px;Z-INDEX: 101; LEFT: 200px; POSITION: absolute; TOP: 240px" />
<select name="ListBox1" size="4" id="ListBox1" style="width:152px;Z-INDEX: 102; LEFT: 176px; POSITION: absolute; TOP: 120px"></select>
ÎÒÃÇËüµÄ²»Í¬Ö®´¦£¬Ò»ÊÇÉÙÁËÒÔÇ°Ëù±ØÐëÏìÓ¦¿Í»§¶ËʼþµÄ½Å±¾ÓïÑÔ£¬Ò»ÊǶàÁËÒ»¸öÃûΪ”_VIEWSTATE”µÄÊôÐÔ¡£ÆäÖµÊÇÒ»³¤´®×Ö·û¡£ÀàÐÍΪ“hidden”¡£Õâ¸öÖµ¼Ç¼µÄ¾ÍÊǸ÷¸ö¿Ø¼þºÍÒ³ÃæµÄ״̬ÐÅÏ¢¡£µ±Óû§¶ÔÒ³Ãæ½øÐÐÏà¹Ø²Ù×÷µÄʱºò£¬×´Ì¬Öµ·¢Éú¸Ä±ä£¬²¢½«¸Ä±äµÄÖµ´«µÝ¸ø·þÎñÆ÷¶Ë¡£·þÎñÆ÷¶ËÔڱȽϸıäºóµÄ״ֵ̬ºÍ³õʼֵ֮¼äµÄÇø±ð£¬ÒÔÏìÓ¦¾ßÌåµÄÇëÇó¡£
Ò»µ©Ò³ÃæµÄ¿Ø¼þºÜ¶à£¬ÕâÖÖƵ·±µÄ´«µÝ¿Ø¼þ״ֵ̬¶ÔÍøÂçµÄÏûºÄÊǺܴóµÄ£¬Òò´Ë£¬ASP.NetÌṩÁËEnableViewStateÊôÐÔ£¬ÏµÍ³Ä¬ÈϵÄֵΪtrue¡£µ±ÉèÖÃΪtrueʱ£¬ÔÚ´«µÝ״ֵ̬ʱ¾Í°üÀ¨¸Ã¿Ø¼þ£»Èç¹ûÉèÖÃΪfalse£¬Ôò´«µÝ״ֵ̬ʱÔò²»°üÀ¨Ëü¡£¼ÈȻ״ֵ̬²»°üÀ¨¸Ã¿Ø¼þ£¬Ôò¿Í»§¶Ë¶ÔËü½øÐеIJÙ×÷£¬·þÎñÆ÷¶ËÊDz»ÏìÓ¦µÄ¡£
ÎÒÃÇ¿ÉÒÔ×ö¸öʵÑ飬ÔÚButton1_ClickʼþÖУ¬±àд´úÂ룺
ListBox.Items.Add(”¿Í»§¶Ëµã»÷°´Å¥Ò»´Î£¡”);
´ËʱÔ
Ïà¹ØÎĵµ£º
Ó¦ÓÃ1£ºGridViewºÍCheckBox½áºÏ
Ч¹ûͼ£º
Ó¦ÓÃ2£ºExtending the GridView Control
Code download available at: CuttingEdge05.exe (132 KB)
Browse the Code Online
Contents
The GridView Difference
A New GridView Control
Adding a Checkbox Column
The New Grid In Action
Styling Selected ......
ASP.NET 2.0 AjaxÖÐÄܹ»ÔÚ¿Í»§¶ËjsÖкܷ½±ãµØµ÷Ó÷þÎñÆ÷Webservice£¬ÒÔÏÂΪһЩµ÷ÓõÄʾÀý¡£±ÊÕß°²×°µÄASP.NET 2.0 AJAX
°æ±¾ÎªAJAX November CTP¡£
Èý¸öʾÀý·Ö±ðΪ£º
1 ´ø²ÎÊýµÄWS·½·¨
2 ²»´ø²ÎÊýµÄWS·½·¨
3 ²ÎÊýÀàÐÍΪDataTableµÄWS·½·¨
Ò»¡¢WebMethod
×¢ÒâÒªµã£º
1 WebMethodÀàÐèÒªÌí¼ÓÃüÃû¿Õ¼ä Microsoft.Web. ......
ÔÚ±¾ÆªÎÄÕÂÖУ¬ÎÒÃǽ«ÌÖÂÛ±à³ÌÈËÔ±ÔÚʹÓÃASP.NET¿ª·¢Ó¦ÓóÌÐòʱÐèҪעÒâµÄ10¸ö¼¼ÇÉ£¬ÕâЩ¼¼ÇÉÉæ¼°´ÓȱʡµÄ¿Ø¼þ¡¢±íµ¥ÃûµÄ¸Ä±äµ½StringBuilderÀàµÄʹÓã¬ÓÐÖúÓÚ±à³ÌÈËÔ±Äܹ»¾¡¿ìµØÊÊÓ¦.NET»·¾³¡£
¡¡¡¡1¡¢ÔÚʹÓÃVisual Studio .NETʱ£¬³ýÖ±½Ó»ò·ÇÒýÓõĶÔÏóÍ⣬²»ÒªÊ¹ÓÃȱʡµÄÃû×Ö
¡¡¡¡.NET´øÀ´µÄºÃ´¦Ö®Ò»ÊÇËùÓеÄÔ´´úÂëºÍ ......
asp.net(c#)ÍøÒ³ÌøתÆßÖÖ·½·¨Ð¡½á
·¢²¼Ê±¼ä£º2009-11-25 11:13:03
¡¡¡¡1.Response.Redirect("http://www.yayiba.com",false);
¡¡¡¡Ä¿±êÒ³ÃæºÍÔÒ³Ãæ¿ÉÒÔÔÚ2¸ö·þÎñÆ÷ÉÏ£¬¿ÉÊäÈëÍøÖ·»òÏà¶Ô·¾¶¡£ºóÃæµÄboolֵΪÊÇ·ñÍ£Ö¹Ö´Ðе±Ç°Ò³¡£
ÌøתÏòеÄÒ³Ã棬Դ°¿Ú±»´úÌæ¡£"
ä¯ÀÀÆ÷ÖеÄURLΪз¾¶¡£
:Response.Redirect·½ ......
¼¸¿îASP.NETÔÚÏßÎı¾±à¼Æ÷
1£¬FCKeditor ±à¼Æ÷
×îа汾: 2.3.1
Õ¾µã£ºhttp://www.fckeditor.net
ÑÝʾ£ºhttp://www.fckeditor.net /demo
Ìص㣺¿ªÔ´¡¢Ãâ·Ñ Ö§³Ö¾ø´ó¶àÊýä¯ÀÀÆ÷
Ö§³ÖÓïÑÔ¶à
ASP.Net * ASP * ColdFusion * PHP * Java * Active-FoxPro * Lasso * Perl * Python
2£¬eWebEditorÔÚÏß±à¼Æ÷ ......