Hello,
I encapsulated my ViewState in my cs class, in a StateBag,
But How do I set the particular variable of the statebag?
Say
I am setting a variable called sortExpression...
class Data {
private StateBag viewState = new StateBag();
public StateBag ViewState
{
get; set;
}
}
///
public partial class Default : System.Web.UI.Page {
private Data data = new Data();
public Data Data {
get;
set;
}
protected void Page_Load(object sender, EventArgs e) {
Data.ViewState["sortExpression"] = "123";
}
}
But the variable namely sortExpression is null when getting set.
How do I properly set it?
Thanks
Jack
Go to the complete details ...