No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Answered by pcavacas
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
TheLearnedOne
EE Cleanup Volunteer
Main Topics
Browse All Topics





by: pcavacasPosted on 2003-04-15 at 09:18:27ID: 8334871
You can't remove the saving of state for textboxes. There are a couple of controls that you can't do this for (I forgot exactly which ones, but I believe checkboxes are the other one).
Also you can never completely remove viewstate. If you search around the web you can find a utility that will decode the ViewState into human readable form and you will be able to see what is left in viewstate. One thing that will always be there (this was a problem that I have before and could never get around) is a list of all of the controls which will cause a postback to occur. There is some other information in there as well.
One way you can prove that viewstate is indeed turn off for the textbox is to put something very large into the textbox and hit the button. The size of viewstate should still be small, i.e. not include the large amounts of text that you put in the textbox.
If you want to clear out the textbox then you will need to set the text property of the textbox to an empty string.