I am developing a web application in which i need to store a some values in a hiddenfield and i need to access this values in other pages. I need to post huge data and so i prefer using HiddenField than Session or QueryString. I am using the following code.
<asp:HiddenField ID="hdnEmailID" runat="server" />
protected void LinkGroupSummary_Click(object sender, EventArgs e)
hdnEmailID.Value = this.EmailList;
if (Page.PreviousPage != null)
HiddenField MyHiddenValue = (HiddenField)Page.PreviousPage.FindControl("hdnEmailID");
if (MyHiddenValue != null)
string email = MyHiddenValue.Value;
In the Default.aspx.cs page, i am getting MyHiddenField as null always.
Thanks in advance,
18 Jun '12 - 16:40
18 Jun '12 - 18:30
27 Nov '12 - 21:38
Edited 27 Nov '12 - 21:39
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)