Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ASP.Net 2.0&UP ViewState¶ªÊ§ÎÊÌâ

    Ã»ÓÐ×ÐϸÑо¿¹ýViewState£¬×î½ü³öÏÖµÄÎÊÌâÈÃÈËÍ·Í´²»ÒÑ¡£
    ViewState»áÔÚijЩÌض¨Çé¿öÏÂÏûʧ£¬ÇÒºÜÄѲ¶×½µ½¡£²éÁËһЩ¼¼ÊõÎÄÕ£¬¶¼ÊÇ˵ViewStateµÄ»úÖÆÊǽ«ÐÅÏ¢´æÔÚÒ³ÃæµÄhidden inputÀïÃ棬Ëƺõ²»¿ÉÄÜ´æÔÚÕâЩÎÊÌ⣬¸ø³öµÄÀíÓÉÎÞ·ÇÊÇÔÚij¸öµØ·½±»Ä³¸ö²»Ð¡ÐĵijÌÐòÔ±¸ø½ûµô»òÇå³ýµôÁË¡£µ«ÕÒÁ˺ܾÃҲûÕÒµ½Õâ¸öµØ·½......
    Ò»¸öżȻµÄ»ú»á¿´µ½ÁËһƪ¹ØÓÚViewState»úÖƵÄÎÄÕ£¬µ±¿´µ½ÏÂÃæÕâ¶ÎÎÄ×Öʱ¶Ùʱ»íÈ»¿ªÀÊ
   ----------------------------ÎÒÊÇ·Ö¸îÏß-------------------------------------------------------------------------
   ºÇºÇ£¬Óеġ£´ÓAPS.NET2.O¿ªÊ¼£¬Î¢ÈíΪÎÒÃÇÌṩÁË£¡¹ËÃû˼Ò壬Õâ¸öÀà¿ÉÒÔ½«VIEWSTATE´æ´¢ÔÚSessionÖУ¬¶ø²»ÊÇHidden InputÖС£Õâ¿ÉÒÔÓÃÓÚ´óÊýÁ¿¼¶µÄVIEWSTATE´¦Àí£¬ËüµÄʵÏÖÒ²Òì³£¼òµ¥
       ---ת×Ô“×ÔÓÉ·É” http://www.cnblogs.com/freeflying/archive/2010/01/03/1638264.html
  ----------------------------ÎÒÊÇ·Ö¸îÏß-------------------------------------------------------------------------
  ¹ûÈ»ÔÚ»ùÀàÖÐÕÒµ½ÁËÈçÏ·½·¨:
   ///ÉèÖÃ ViewState¶ÔÏó ±£´æÔÚSessionÖÐ
   protected override PageStatePersister PageStatePersister
        {
            get
            {
                return new SessionPageStatePersister(this);
            }
        }
  Ô­À´×Ô´Ó2.0ÒÔÀ´£¬¶àÁËÒ»ÖÖÑ¡Ôñ£¬¿ÉÒÔ½«ViewStateÐÅÏ¢´æµ½SessionÖУ¬SessionºÍÒ³ÃæÏà±È¾ßÓа²È«¡¢½ÚÊ¡´ø¿í×ÊÔ´µÈºÃ´¦¡¢¼õÉÙ¿Í»§¶Ë×ÊÔ´ÏûºÄ£¬µ«Êǵ«Êǵ«ÊÇȱµãÒ²²»ÉÙ¡£ÓÉÓÚʵ¼Ê±£´æÔÚSessionÖУ¬SessionµÄËùÓÐȱµã¶¼»á¾ß±¸¡£Èç¹ûûÓиöºÃµÄSession¹ÜÀí³µÂÔ¼«ÈÝÒ׳öÏÖ¶ªViewState¶ªÊ§µÄÇé¿ö¡£
  ËùÒÔ´ó¼ÒÔÚÑ¡ÔñViewStateµÄ±£´æ»úÖÆʱҪСÐÄ°¡¡£³ý·Ç±ØÒª½¨Ò黹ÊÇÓÃËü±¾À´µÄ·½Ê½°É¡£
///ÉèÖà ViewState¶ÔÏó ±£´æÔÚÒ³ÃæÖÐ
protected override PageStatePersister PageStatePersister
      


Ïà¹ØÎĵµ£º

ʹÓÃASP.Net FormsģʽʵÏÖWebServiceÉí·ÝÑéÖ¤

ʹÓÃASP.Net FormsģʽʵÏÖWebServiceÉí·ÝÑéÖ¤
    ÔÚ°²È«ÐÔÒªÇó²»ÊǺܸߵÄASP.Net³ÌÐòÖУ¬»ùÓÚFormsµÄÉí·ÝÑéÖ¤ÊǾ­³£Ê¹ÓõÄÒ»ÖÖ·½Ê½£¬¶øÈç¹ûÐèÒª¶ÔWebService½øÐÐÉí·ÝÑéÖ¤£¬×î³£ÓõĿÉÄÜÊÇ»ùÓÚSoap ±êÍ·µÄ×Ô¶¨ÒåÉí·ÝÑéÖ¤·½Ê½¡£Èç¹û¶ÔÁ½Õß×öһϱȽϵĻ°£¬ÏÔÈ»£¬»ùÓÚFormsµÄÑéÖ¤·½Ê½¸ü¼Ó·½±ãÒ×Óã¬ÄÜ·ñ½«F ......

½üÆÚ×÷Æ· asp.netÍøÒ³°æ¶·µØÖ÷(δÍê´ýÐø)

Ê×ÏÈÉêÃ÷ ´¿Êô¸öÈËÁ·Ï°Ö®×÷ ÇëÎðÓÃÓÚÉÌҵĿµÄ..........ÎÞÓï
¼ÍÄîÒ»ÏÂÎÒÒÔÇ°µÄÒ»¸ö×÷Æ·<¿ú>,ÒÔºó¾ÍÓÃËüµ±ÎÒµÄLOGOÁË
½ñÌìÊÇÊ×·¢,ÕâƪÎÄÕÂÎÒ»á³ÖÐø¸üÐÂ,ÎÒ²ÎÕÕÁËÔ°ÇøÀïÇ°±²µÄ¾­Ñé,ÃþË÷×ÅȥʵÏÖ,Ä¿Ç°´óÌåµÄ»¹Î´ÍêÉÆ,ÏÈ·¢ÕÅͼÉÏÀ´...
......

ASP.NET(C#)·µ»ØÉÏÒ»Ò³(ºóÍË)´úÂ루תÔØ£©

ASP.NET(C#)·µ»ØÉÏÒ»Ò³(ºóÍË)´úÂë
2008-08-10 10:32
protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        ViewState["BackUrl"] = Request.UrlReferrer.ToString();
    }
}
/// <s ......

¿ØÖÆAsp.netµÄButton¿Ø¼þµÄÌá½»¶¯×÷

asp.net¿ª·¢ÖУ¬Í¨³£ÐèÒª×öһЩ¿Í»§¶ËÑéÖ¤¡£µ±ÎÒÃÇĬÈÏÔÚÒ»¸öÒ³ÃæÖмӸöbutton¿Ø¼þʱ£¬Õâ¸öButton±»asp.net Êä³öΪһ¸öSubmit°´Å¥¡£ asp:Button ID=Button1 runat=server Text=Button on click=Button1_Click /
ÔÚ_doPostBack·½·¨ÄÚ£¬Í¨¹ýtheForm.submit()À´Ê¹Êý¾ÝÌá½»µ½·þÎñÆ÷¡£
ÕâÑùºÜÈÝÒ׿´³ö£¬Èç ¹ûÎÒÃÇÏëÒªÔÚÊý¾ÝÌá½ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ