Post data to a different form

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
 
N

Nathan Sokalski

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top