anand Posted October 2, 2003 Posted October 2, 2003 Hi Pls give me a idea abt hideen values in asp.net... i am doing like this in page1.aspx <form id="Form1" method="post" runat="server" action="page2.aspx"> <asp:button id="Button1" style="Z-INDEX: 101; LEFT: 320px; POSITION: absolute; TOP: 168px" runat="server" Text="Button"></asp:button><asp:hyperlink id="HyperLink1" style="Z-INDEX: 102; LEFT: 224px; POSITION: absolute; TOP: 240px" runat="server" NavigateUrl="page2.aspx?ID=1234">HyperLink</asp:hyperlink> <input type="hidden" name="hid1" id="hid1" value="777" runat="server"> <input type="hidden" name="hid2" id="hid2" value="888" runat="server"> </form> i am passing two hideen values i am going to retrieve those in page2.aspx..but i am not Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Response.Write(Request.Form("hid1")) Response.Write(Request.Form("hid2")) Response.Write("event") End Sub but i am not getting the values..pls give me the correct code.. Thanks satya Quote Satya
bungpeng Posted October 3, 2003 Posted October 3, 2003 If you want to post from page1.aspx to page2.aspx, I suggest you remove all the "runat=server" and use HTML control rather than web control. It will work fine for you like in ASP Quote
yvesvlb Posted October 3, 2003 Posted October 3, 2003 This sugestion is *really* out there; but here goes anyway; use the session!! Session["ClutterTheMem"] = m_personalClutter; Quote
*Gurus* Derek Stone Posted October 3, 2003 *Gurus* Posted October 3, 2003 Controls that are declared with their runat attribute set to "server" should not be access with the Request.Forms collection. They should be accessed using their control name. Dim s As String = hid1.Value You should also remove the name attributes that you have defined. Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.