Reputation: 25141
I've set ViewStateMode="Disabled" on a textbox, however when I perform any postback action, when the page loads again it's text value is still retained.
Have I misunderstood this property?
Assigning it string.empty
on postback seems abit over the top.
Upvotes: 0
Views: 1581
Reputation: 460138
Have a look at this article. It explains very well why the text is being persisted even if ViewState is disabled. So you don't come around assigning to it String.Empty
on postback.
Upvotes: 1