ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP 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:
  #1  
Old March 28th, 2000, 03:00 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
Add, Delete and Update Forms

<i><b>Originally posted by : Spencer Hopkinson (Spencer@Eighthday.freeserve.co.uk)</b></i><br />Hi there,<br /><br />I work for an eCommerce company and I am a VB / C++ developer who is being pushed in an ASP direction!!<br /><br />I have several maintenance forms consisting of combos and text details for the item selected from the combo.<br /><br />I have also Add New , update and delete image buttons on the form. When I select an action from the buttons I populate a hidden HTML field with the action via some JAVA code e.g "ADDNEW".<br />I then select case for the value in request.form("HideAction") and do action accordingly. Is this a respectable method to do things or do I speak the words of a crazy man?!?!? Pointers / advice would be greatly appreciated!!

Reply With Quote
  #2  
Old March 28th, 2000, 07:14 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 : steve (sschofield@aspfree.com)</b></i><br />you have to find out whats most comfortable to you. BUT what you've described is very clean efficient coding. one of the demo's on asp free has multiple buttons on one form. i found this to be a very clean, efficient way of coding. only took me awhile to learn it! Good luck on your ventures. http://www.aspfree.com/asp/startpage.asp?id=37<br />here is the link to the demo on multiple buttons and how i did. its very basic but gives you an idea.<br /><br />steve<br />webmaster<br />aspfree.com<br /><br /><br />------------<br />Spencer Hopkinson at 3/28/2000 1:00:38 AM<br /><br />Hi there,<br /><br />I work for an eCommerce company and I am a VB / C++ developer who is being pushed in an ASP direction!!<br /><br />I have several maintenance forms consisting of combos and text details for the item selected from the combo.<br /><br />I have also Add New , update and delete image buttons on the form. When I select an action from the buttons I populate a hidden HTML field with the action via some JAVA code e.g "ADDNEW".<br />I then select case for the value in request.form("HideAction") and do action accordingly. Is this a respectable method to do things or do I speak the words of a crazy man?!?!? Pointers / advice would be greatly appreciated!!

Reply With Quote
  #3  
Old March 31st, 2000, 03:28 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 : Chris Snider (csnider@worldnet.att.net)</b></i><br />Spencer,<br /><br />I agree with Steve that you need to find what you are most comfortable in doing.<br /><br />A method that I have used to great success is to use multiple submit buttons with different values, but the same name.<br />For instance:<br /><form method="post" action="myactionprocess.asp"><br /><input type="text" value="" size="25" name="imagedetail"><br /><select name="selectname"><br /><option value="value1">value1</option><br /><option value="value2">value2</option><br /><option value="value3">value3</option><br /></select><br /><INPUT type="submit" value="Add new" id="DataAction" name="DataAction"><br /><INPUT type="submit" value="Update" id="DataAction" name="DataAction"><br /><INPUT type="submit" value="Delete" id="DataAction" name="DataAction"><br /></form><br /><br />When any of the submit buttons is pressed, the same form action is fired, and the receiving asp file only gets the value of the DataAction that was actually pressed. You can then do like you specified and use a Select Case like the following:<br />Dim DataAction<br />DataAction = LCase(Request("DataAction"))<br />Select Case DataAction<br />Case "update"<br /> Call UpdateFunction()<br />Case "add new"<br /> Call AddNewFunction()<br />Case "delete"<br /> Call DeleteFunction()<br />End Select<br /><br />If you need further explanation or have other questions, please email me.<br /><br />Chris Snider<br /><br />------------<br />steve at 3/28/2000 5:14:14 AM<br /><br />you have to find out whats most comfortable to you. BUT what you've described is very clean efficient coding. one of the demo's on asp free has multiple buttons on one form. i found this to be a very clean, efficient way of coding. only took me awhile to learn it! Good luck on your ventures. http://www.aspfree.com/asp/startpage.asp?id=37<br />here is the link to the demo on multiple buttons and how i did. its very basic but gives you an idea.<br /><br />steve<br />webmaster<br />aspfree.com<br /><br /><br />------------<br />Spencer Hopkinson at 3/28/2000 1:00:38 AM<br /><br />Hi there,<br /><br />I work for an eCommerce company and I am a VB / C++ developer who is being pushed in an ASP direction!!<br /><br />I have several maintenance forms consisting of combos and text details for the item selected from the combo.<br /><br />I have also Add New , update and delete image buttons on the form. When I select an action from the buttons I populate a hidden HTML field with the action via some JAVA code e.g "ADDNEW".<br />I then select case for the value in request.form("HideAction") and do action accordingly. Is this a respectable method to do things or do I speak the words of a crazy man?!?!? Pointers / advice would be greatly appreciated!!

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > Add, Delete and Update Forms


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 3 hosted by Hostway