& 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
Jignesh TrivediPosted Mar 2, 2012, 1:31 AM
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.
satya srinivasPosted Mar 2, 2012, 1:24 AM
http://aspadvice.com/blogs/joteke/archive/2004/03/15/2273.aspx