Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Page with 2 forms on ??

Reply
Thread Tools

Page with 2 forms on ??

 
 
Poppy
Guest
Posts: n/a
 
      02-09-2004
If I have 2 forms on a page "form1" & "form2", is there a way to figure out
which form has in fact been submitted ?

Thanks in Advance


 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      02-09-2004
Poppy wrote on 09 feb 2004 in microsoft.public.inetserver.asp.general:
> If I have 2 forms on a page "form1" & "form2", is there a way to
> figure out which form has in fact been submitted ?


name the submit button or add a hidden input

in fact off topic, clientside issue.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
 
 
 
Ray at
Guest
Posts: n/a
 
      02-09-2004
I don't think this is a client-side issue.

Go with the hidden input. If you use different submit buttons, you won't be
able to tell which form it is when a user submits with Enter or Ctrl+M.

<form action="page.asp" method="post">
<input type="hidden" name="whichForm" value="1">
< rest of form>
</form>


<form action="page.asp" method="post">
<input type="hidden" name="whichForm" value="2">
< rest of form>
</form>


<%
Select Case Request.Form("whichForm")
Case "1"
Response.Write "Form 1 was submitted"
Case "2"
Response.Write "Form 2 was submitted"
End Select
%>

Ray at work

"Evertjan." <> wrote in message
news:Xns948A6C76F2600eejj99@194.109.133.29...
> Poppy wrote on 09 feb 2004 in microsoft.public.inetserver.asp.general:
> > If I have 2 forms on a page "form1" & "form2", is there a way to
> > figure out which form has in fact been submitted ?

>
> name the submit button or add a hidden input
>
> in fact off topic, clientside issue.
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
forms authentication -- expired forms cookie vs. not provided forms cookie Eric ASP .Net Security 2 01-27-2006 10:09 PM
embedded windows forms into web forms for control =?Utf-8?B?ZGF2aWQ=?= ASP .Net 2 04-10-2005 01:07 PM
Creating ASP.NET forms, that act like HTML forms jlopes151 ASP .Net 2 03-14-2005 01:01 AM
Forms Authentication question: How to have some pages open and some requiring forms authentication Eric ASP .Net 2 02-13-2004 02:14 PM
Web Forms VS Windows Forms Brendan Miller ASP .Net 2 08-11-2003 09:05 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57