& a submit button bellow it.But when this form is displayed and as I enter Piyush in textbox & click on submit button.Textbox is not cleared and it displays Piyush.even though I have disabled View Stae For this form
Why ViewState is not created even though EnableViewState = False is set on textbox control?
I have a Web Form with following TextBox Control
& a submit button bellow it.But when this form is displayed and as I enter Piyush in textbox & click on submit button.Textbox is not cleared and it displays Piyush.even though I have disabled View Stae For this form
& a submit button bellow it.But when this form is displayed and as I enter Piyush in textbox & click on submit button.Textbox is not cleared and it displays Piyush.even though I have disabled View Stae For this form
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

satya srinivas18 reputationPosted Mar 1, 2012, 8:24 PM EST
http://aspadvice.com/blogs/joteke/archive/2004/03/15/2273.aspx
Jignesh TrivediRank #16 · 50.3K reputationPosted Mar 1, 2012, 8:31 PM EST
In the ASP.NET life cycle, there are two type of events which are responsible for the maintain data after postback.
1)LoadViewState
2)LoadPostBackData.
If any control that is implement from IPostBackDataHandler, values get load
from Http Post data in the LoadPostBackData event.
A TextBox control does not get its value from the view state but get values from the post data in the form in this event.
So even if you disable view state for the TextBox control, it can get its value from the HTTP post data if it implements IPostBackDataHandler interface.
hope this help.