I have a web form with a hiddenField control called formID. My goal is when the user hits the submit button, I need the value of ID from the database to be available on the next page so I can pull the users data into the form using a ListView control. The
issue is that the value is null on Page 2. Is there a better way to achieve this? Thanks
Here is my hiddenfield on page1:
<asp:HiddenField runat="server" Value="<%$ ConnectionStrings:ECString %>" ID="formID" />
On page 2 cs file in Page_Load
HiddenField hf = (HiddenField)Page.PreviousPage.FindControl("formID");
string ID = hf.Value;
On my ListView control pn page 2
</asp:ListView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ECStr ...
Go to the complete details ...