These are all the internal workings of ASP.NET. It's not something you have any control over. You can turn off ViewState, but if you do that, many controls will stop working like you expect them to.
Yes, you can. In cases where the viewstate gets very large, developers overwrite the viewstate mechanism to store it on the server or on a database instead of sending to the client in the html.
Just google "Storing asp.net viewstate in session" or "storing asp.net viewstate in database" and you should get several results showing you how.
miguelangel1...
Member
16 Points
98 Posts
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTg3MjQ" />
Jul 10, 2008 10:31 AM|LINK
Hi I am developig a website and when I try to see the page source in the explorer I have houndreds of lines about this:
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATEFIELDCOUNT" id="__VIEWSTATEFIELDCOUNT" value="697" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTg3MjQ" />
<input type="hidden" name="__VIEWSTATE1" id="__VIEWSTATE1" value="3ODY2MQ9kFgJmD2" />
<input type="hidden" name="__VIEWSTATE2" id="__VIEWSTATE2" value="QWAgIED2QWCAIJD" />
<input type="hidden" name="__VIEWSTATE3" id="__VIEWSTATE3" value="2QWGGYPDxYEHgRU" />
<input type="hidden" name="__VIEWSTATE4" id="__VIEWSTATE4" value="ZXh0BT1Tb3V0aCB" />
<input type="hidden" name="__VIEWSTATE5" id="__VIEWSTATE5" value="BZnJpY2EgbmFtZS" />
<input type="hidden" name="__VIEWSTATE6" id="__VIEWSTATE6" value="BzcGlubmVyIGFuZ" />
<input type="hidden" name="__VIEWSTATE7" id="__VIEWSTATE7" value="CBpbnZpdGUgRW5n" />
<input type="hidden" name="__VIEWSTATE8" id="__VIEWSTATE8" value="bGFuZCB0byBiYXQ" />
<input type="hidden" name="__VIEWSTATE9" id="__VIEWSTATE9" value="gYXQgTG9yZCdzHg" />
<input type="hidden" name="__VIEWSTATE10" id="__VIEWSTATE10" value="tOYXZpZ2F0ZVVyb" />
<input type="hidden" name="__VIEWSTATE11" id="__VIEWSTATE11" value="AVUL25ld3MvQ3Jp" />
How can I do not to show all of this? Thanks
MelvynHarbou...
Star
8005 Points
1288 Posts
Re: <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTg3MjQ" />
Jul 10, 2008 10:56 AM|LINK
These are all the internal workings of ASP.NET. It's not something you have any control over. You can turn off ViewState, but if you do that, many controls will stop working like you expect them to.
miguelangel1...
Member
16 Points
98 Posts
Re: <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTg3MjQ" />
Jul 10, 2008 11:40 AM|LINK
But is there another way, because the html code is very large. It would be possible to store in a session state?
tarique_s
Member
64 Points
35 Posts
Re: <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTg3MjQ" />
Jul 14, 2008 04:52 AM|LINK
Yes, you can. In cases where the viewstate gets very large, developers overwrite the viewstate mechanism to store it on the server or on a database instead of sending to the client in the html.
Just google "Storing asp.net viewstate in session" or "storing asp.net viewstate in database" and you should get several results showing you how.