More than one form.

C

CK

Hi All,
I encounter one problem with my asp scrits. In my HTML file, I
have two forms. Which is <form name="form1".....> </form> and <form name =
"form2...> and using Post Method.
When I use the request.form in my asp script. How i can trace the
value from form 1 and form 2. Please advice. Thanks.

Regards,
C.K.
 
M

Manohar Kamath

Have a hidden variable in both, give different values. On your posted page,
check for this value

<form name="form1" action="some.asp">
<input type=hidden name=formName value=form1>


<form name="form2" action="some.asp">
<input type=hidden name=formName value=form2>


On the some.asp

<%
If Request.Form("formName") = "form1" Then
.. do something
ElseIf Request.Form("formName") = "form2" Then
.. do something else
End if
%>
 
C

CK

Thanks for your help. :)

Regards,
C.K.

Manohar Kamath said:
Have a hidden variable in both, give different values. On your posted page,
check for this value

<form name="form1" action="some.asp">
<input type=hidden name=formName value=form1>


<form name="form2" action="some.asp">
<input type=hidden name=formName value=form2>


On the some.asp

<%
If Request.Form("formName") = "form1" Then
.. do something
ElseIf Request.Form("formName") = "form2" Then
.. do something else
End if
%>
 

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,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top