Last post Jul 13, 2011 01:30 PM by GPankaj
Jul 12, 2011 08:21 AM|Fonzie|LINK
On Page1.aspx my EnableViewState="False" and I fill out a textbox for a query and hit submit, then Page2.aspx displays the results, I hit the back button and textbox1 is still showing my query. Why is this happening if I have it set to false?
Jul 12, 2011 08:24 AM|Raigad|LINK
Please check this URL it IMP one
Jul 12, 2011 08:26 AM|Nandip Makwana|LINK
It is default functionality of HTML control (Although you have used ASP textbox but on client side it is rendered as a HTML control only i.e. Input type=text) Just try creating simple .html page and check with scenario which you tested with .aspx page. In
html page also you when you press back button you will find value preserve.
Jul 12, 2011 08:31 AM|Nandip Makwana|LINK
Jul 12, 2011 09:26 AM|Fonzie|LINK
Ah, that explains it. Textbox is what I use most, next to the gridview. I guess it's programmatic changes that are affected?
Jul 13, 2011 01:30 PM|GPankaj|LINK
The answer is Controls which implements IPostBackEventHandler like Textbox, Checkbox, etc. will retain the state even after disabling the viewstate. The reason is during the Load Postback Data stage, these
controls will get state information from Posted back form.
Please refer this link for further information