devxlogo

Using Multiple Submit Buttons with Select Case

Using Multiple Submit Buttons with Select Case

It is common to have a Web page that calls itself. On this page, you may want to have many buttons that will each produce a different call. An example is a page that allows you to navigate, add, edit, or delete a record/recordset. You can accomplish this by appending special commands to the URL, exposing some implementation details. However, it is also possible to do this through a Post method. When a form has multiple submit buttons all with the same name, the value of the button will be returned via a Post method. You can then use this value to determine your action.

 


Do Move First" Case "Move Previous" Response.Write "

Do Move Previous" Case "Move Next" Response.Write "

Do Move Next" Case "Move Last" Response.Write "

Do Move Last" Case "Add" Response.Write "

Do Add" Case "Edit" Response.Write "

Do Edit" Case "Delete" Response.Write "

Do Delete" Case Else Response.Write "

Invalid Action"End Select%>

devx-admin

Share the Post: