You may just define all your fields as properties with values stored in the ViewState
, like the example below for Month
:
protected int Month
{
get { return this.ViewState["Month"] != null ? (int)this.ViewState["Month"] : 0; }
set { this.ViewState["Month"] = value; }
}