.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old September 11th, 2000, 03:57 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,578 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
Include more than one SUBMIT button on a form

<i><b>Originally posted by : Ashwani (akesarwani@adessohts.com)</b></i><br />Input buttom controls of type SUBMIt actually do submit the form to the server, and their VALUE attribute is included with the values of other <br />controls on the form, provided include a NAME attribute in the HTML definition. For ex. this form might be part of a wizard-style Web <br />application, allowing the user to step through each page or cancel the process part way through:<br /><br /><FORM ACTION="ABCD.ASP" METHOD="POST"><br /> <INPUT TYPE="SUBMIT" NAME="btnSubmit" VALUE = "Next"><br /> <INPUT TYPE="SUBMIT" NAME="btnSubmit" VALUE = "Previous"><br /> <INPUT TYPE="SUBMIT" NAME="btnSubmit" VALUE = "Cancel"><br /></FORM><br /><br />You can include more than one SUBMIT button on a form, and in this case you should give each one a unique VALUE attribute, as shown above. When this <br />form is submitted, your iteration through the values in the REQUEST. Form collection will produce one value, depending on which button was used to submit the form. If the user clicks the Previous button, he'll get just :<br /><br />btnSubmit = Previous<br /><br />Therefore, he can query the Request.Form collection to decide which page to display next, for example :<br /><br />Select Case Request.Form("btnSubmit")<br /><br /> Case "Next"<br /> Response.Redirect "page_3.asp"<br /><br /> Case "Previous"<br /> Response.Redirect "page_1.asp"<br /><br /> Case "Cancel"<br /> Response.Redirect "main_menu.asp"<br /><br />End Select<br /><br />

Reply With Quote
  #2  
Old September 12th, 2000, 04:29 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,578 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : Mitesh (miteshrp@hotmail.com)</b></i><br /><br />Yes Ashwani You can use more than one submit button in a form<br /><br />But you need To design it properly For eg i show You<br /><br /><table><br /><tr><td><form method = post action = "next.asp"><br /><input type = submit value = Next></form></td></tr><br /><tr><td><form method = post action = "previous.asp"><br /><input type = submit value = Previous></form></td></tr><br /><tr><td><form method = post action = "last.asp"><br /><input type = submit value = last></form></td></tr><br /></table><br /><br />This is method by which we can use one more than one submit button in one form<br /><br />The main logic is that we have to start the form a<br />nd create submit button in that instance of form only and that end form with </form> and then again you have to use antother form tag for another submit button in same page as many you can<br /><br />if you want you can pass values independently to each form use you have create object in each form<br />now it can be hidden or some text object or other.then you can pass values independently also<br />to each form and process that form.<br /><br />Ok<br /><br /><br />------------<br />Ashwani at 9/11/2000 1:57:58 PM<br /><br />Input buttom controls of type SUBMIt actually do submit the form to the server, and their VALUE attribute is included with the values of other <br />controls on the form, provided include a NAME attribute in the HTML definition. For ex. this form might be part of a wizard-style Web <br />application, allowing the user to step through each page or cancel the process part way through:<br /><br /><FORM ACTION="ABCD.ASP" METHOD="POST"><br /> <INPUT TYPE="SUBMIT" NAME="btnSubmit" VALUE = "Next"><br /> <INPUT TYPE="SUBMIT" NAME="btnSubmit" VALUE = "Previous"><br /> <INPUT TYPE="SUBMIT" NAME="btnSubmit" VALUE = "Cancel"><br /></FORM><br /><br />You can include more than one SUBMIT button on a form, and in this case you should give each one a unique VALUE attribute, as shown above. When this <br />form is submitted, your iteration through the values in the REQUEST. Form collection will produce one value, depending on which button was used to submit the form. If the user clicks the Previous button, he'll get just :<br /><br />btnSubmit = Previous<br /><br />Therefore, he can query the Request.Form collection to decide which page to display next, for example :<br /><br />Select Case Request.Form("btnSubmit")<br /><br /> Case "Next"<br /> Response.Redirect "page_3.asp"<br /><br /> Case "Previous"<br /> Response.Redirect "page_1.asp"<br /><br /> Case "Cancel"<br /> Response.Redirect "main_menu.asp"<br /><br />End Select<br /><br /><br /><br />

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > Include more than one SUBMIT button on a form


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway