Calling another form

A

Alex Homer

Take a look at "Chapter 2 - Cross-Page Posting Techniques" in
http://www.daveandal.net/books/6744/samples.aspx

The three examples demonstrate changing the action of a form, using
response.redirect, using server.transfer and using a page reference; all
including the issues of passing values form one page to another.
 
J

John

If I use Response.Redirect("page2", false) to redirect to page 2 from this
page, how can I tell page 2 to return to this page when done?

Thanks

Regards
 
L

Lucas Tam

If I use Response.Redirect("page2", false) to redirect to page 2 from
this page, how can I tell page 2 to return to this page when done?

On page 2, you use reponse.redirect back to the original page...

You may need to pass a variable to page1 to tell page1 that you've already
processed page2 and not to redirect again.
 
J

John

What if several pages call page 2 for validation? Should I send the name of
the calling page in the call somehow or is there an automatic method to
determine the calling page?

Thanks

Regards
 
L

Lucas Tam

What if several pages call page 2 for validation? Should I send the
name of the calling page in the call somehow or is there an automatic
method to determine the calling page?

You can use the server variable HTTP_REFERER to find out which page called
the current page.

However, if you're creating a page just for validation it may make more
sense to create a validation class rather than a validation page. With a
validation class, you can call it within a page's validation event without
redirecting.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top