This information is never stored in ViewState.
Not all properties are created as follows.
public string SomeProperty { get { object obj = ViewState["SomeProperty"]; return (obj == null) ? 0 : (string)obj; } set { ViewState["SomeProperty"] = value; } }
SelectCommand is assigned here in the generated C # / Vb class using PageParser. This class will contain some string like
mobileData.SelectCommand="SELECT * from ma.bob WHERE Vendor IS NOT NULL"
and this assignment is executed every time a page is requested. ASP.Net does not need to save this in ViewState.
However, if you do something like
<asp:HiddenField runat="server" Value="SELECT * from ma.bob WHERE Vendor IS NOT NULL" />
This will be a ViewState (what I said about the parser is also true here, but the customization tool implements the ViewState mechanism here)
source share