Post data to a different form

  • Thread starter Thread starter Sehboo
  • Start date Start date
S

Sehboo

I have two forms. Form1 has two hidden fields and a button. When
when I click on the button, I want to perform some action and then I
want to post the data from those two hidden fields to form2. I cannot
use the query string, I have to post the data, after I do some
processing in the click event.

How can I do that? any pointers? thanks
 
Try this:

On the Page that contains form2, do the following:
Add the directive <%@ PreviousPageType
VirtualPath="PageTransferringFrom.aspx" %>
Use the code Me.PreviousPage.hdnHiddenField.Value to access the Value
property

On the Page that contains form1, do the following:
In the Click eventhandler for the desired Button, add the code you want
executed beforehand
Immediately follow that code with
Server.Transfer("PageTransferringTo.aspx")

Hopefully this helps. Good Luck!
 
Back
Top