| 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"
|