views:

995

answers:

0

Hi,

I have two hidden controls:

<asp:HiddenField runat="server" id="pageHeader" />
<asp:HiddenField runat="server" id="pageInformation" />

I am calling following function from master page:

show_tip(this, document.getElementById('ctl00_pageInformation').value, document.getElementById('ctl00_pageHeader').value);

and i am passing values in hidden field on .cs page in page load as follows:

 string message = Request.Form["pageInformation"];
 if (string.IsNullOrEmpty(message))
 {
      ((HiddenField)Master.FindControl("pageHeader")).Value = pageHeading;
      ((HiddenField)Master.FindControl("pageInformation")).Value = pageInformation;
 }

This is working fine, but on page POSTBACK, hidden fields lose their value. How can I retain the values after postback?