0

I don't know it's even possible but I try to achieve to post data from one page to another using the second form.
The problem is I need a form tag for the user interface containing callback panels etc. I want to put a second form with some hidden-field:

<form id="postForm" method="post" action="target.aspx">
    <input type="hidden" id="id" />
</form>

I submit the form from javascript with jquery:

$("#id").val(id);
$("#postForm").submit();

Is there a way access the value of the hidden field on the target page?

tshepang
  • 12,111
  • 21
  • 91
  • 136
Péter
  • 2,161
  • 3
  • 21
  • 30

1 Answers1

1

You should give the hidden field a name attribute:

<input type="hidden" id="id" name="id" />

You'll then be able to use Request.Form in your target page to access the posted data:

string postedId = Request.Form["id"];
LukeH
  • 263,068
  • 57
  • 365
  • 409