How to use Hideen variables in ASP.Net pages??

Results 1 to 2 of 2

Thread: How to use Hideen variables in ASP.Net pages??

  1. #1
    Join Date
    Dec 1969

    Default How to use Hideen variables in ASP.Net pages??

    Hi Pls give me a idea abt Hideen Variables in ASP.NET..<BR><BR>i am doing like this <BR><BR>in page1.aspx<BR>&#060;form id="Form1" method="post" runat="server" action="page2.aspx"&#062;<BR> &#060;asp:button id="Button1" style="Z-INDEX: 101; LEFT: 320px; POSITION: absolute; TOP: 168px" runat="server"<BR> Text="Button"&#062;&#060;/asp:button&#062;&#060;asp:hyperlink id="HyperLink1" style="Z-INDEX: 102; LEFT: 224px; POSITION: absolute; TOP: 240px"<BR> runat="server" NavigateUrl="page2.aspx?ID=1234"&#062;HyperLink&#0 60;/asp:hyperlink&#062;<BR> &#060;input type="hidden" name="hid1" id="hid1" value="777" runat="server"&#062;<BR> &#060;input type="hidden" name="hid2" id="hid2" value="888" runat="server"&#062;<BR> &#060;/form&#062;<BR>i am passing two hideen values<BR><BR>i am going to retrieve those in page2.aspx..but i am not<BR><BR>Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<BR> Response.Write(Request.Form("hid1"))<BR> Response.Write(Request.Form("hid2"))<BR> Response.Write("event")<BR> End Sub<BR><BR><BR>but i am not getting the values..pls give me the correct code..<BR><BR>Thanks<BR>satya<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: How to use Hideen variables in ASP.Net pages??

    For one thing, I don&#039;t think you want the hyperlink in your form. If you click it, you don&#039;t get your values posted. Clicking Button1 posts your form.<BR><BR>Secondly, your response.write code shouldn&#039;t be in a Button1_Click routine on page2, because button1 is on page1, not the page to which you&#039;re posting. If you post to a different page, try executing the writes in the Page_Load routine.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts