IIS ASP - how to handle more than one submit buttons

This is Interesting: Free IT Magazines  
Home > Archive > IIS ASP > March 2006 > how to handle more than one submit buttons





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author how to handle more than one submit buttons
Sivaswami Jeganathan

2006-03-25, 11:59 am

how to handle more than one submit button's
request in an
asp page.

ie........

multiple web pages are leading to a single asp
page atlast.
i want to distinguish between the web pages that
are
posting.


--
Sivaswami Jeganathan


Bob Barrows [MVP]

2006-03-25, 11:59 am

Sivaswami Jeganathan wrote:
> how to handle more than one submit button's
> request in an
> asp page.
>
> ie........
>
> multiple web pages are leading to a single asp
> page atlast.
> i want to distinguish between the web pages that
> are
> posting.


Several possibilities:
1. Use unique names for the submit buttons (or unique strings in the value
attribute of the submit button) and check the request.form collection for
that name and/or value
2. Use a hidden field to identify which form is sending the request
3. Use a querystring variable in the url put into each form's action
attribute
4. Not reliable, but you could check
Request.ServerVariables("http_referrer")

There's more, but this should get you started.
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com