Hi All,
I have aspx form in which i am adding values in asp:Label control.
I have one dropdown control in which after selection of List Item page it gives IsPostback or i can say its get hit to the server.
I want to retain values in Label controls,even when there are 1,2 or many postback.
I am trying below thing.
if (!IsPostBack)
{
if (ViewState["lblwords"] == null)
{
ViewState["lblwords"] = lblwords.Text;
lblwords.Text = ViewState["lblwords"].ToString();
}
ViewState["lblbasicrate"] = lblbasicrate.Text;
lblbasicrate.Text = ViewState["lblbasicrate"].ToString();
ViewState["lbltotalnumberreport"] = lbltotalnumberreport.Text;
lbltotalnumberreport.Text = ViewState["lbltotalnumberreport"].ToString();
ViewState["lblExtraLines"] = lblExtraLines.Text;
lblExtraLines.Text = ViewState["lblE ...
Go to the complete details ...