Well, I brought this up briefly at the Portland Nerd Dinner last night and got a couple quirky faces so I thought I would make a post about it.
The issue is that even when viewstate is disabled, the Text property of the ASP.NET text box still persists. The confusing part is that the text property for the TextBox saves itself directly into the view state. For example, the code for the Text property of the TextBox looks as follows (this was retrieved by using Anakrino):
public string Text
{
get
{
string text;
text = (String)this.ViewState["Text"];
if (text != null)
return text;
return String.Empty;
}
set
{
this.ViewState["Text"] = value;
}
}
How do we know it is persisting? Well, if you add a Button that posts back the value of the text property is preserved. Not only that, but if you use Fritz Onion's View State Decoder, you can see that the text property is indeed persisted into the view state.
Quite an interesting little puzzle. I may just be overlooking something. Any thoughts?