views:

12

answers:

1

Hi,

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?

Thanks,
Péter

A: 

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
Looks like it work perfectly Thanks, Péter
Péter