| | |
Buttons
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
hi good day to all.
im new in ASP and one of my questions now is:
is it possible to have 2 command buttons in one asp page?
if possible how can i separate their actions in one form?
wherein the first button will give the total no. of students
and the second one will give me the total no. of teachers
please...i badly need you help. thanks a lot in advance.
im new in ASP and one of my questions now is:
is it possible to have 2 command buttons in one asp page?
if possible how can i separate their actions in one form?
wherein the first button will give the total no. of students
and the second one will give me the total no. of teachers
please...i badly need you help. thanks a lot in advance.
I hope the below code helps.
ASP Syntax (Toggle Plain Text)
<% If Request("num_student") = "1" Then Response.Write "Number of student button was clicked." ' add your other script here else Response.Write "Number of teacher button was clicked." ' add your other script here End If %> <form name="form1" action="" method="post"> <input type="hidden" name="num_student" value="1"> <input type="submit" value="Number of Student"> </form> <form name="form2" action="" method="post"> <input type="hidden" name="num_teacher" value="1"> <input type="submit" value="Number of teacher"> </form>
Ecommerce-Web-Store.com Building Your e-Business.
•
•
•
•
Originally Posted by zippee
I hope the below code helps.
ASP Syntax (Toggle Plain Text)
<% If Request("num_student") = "1" Then Response.Write "Number of student button was clicked." ' add your other script here else Response.Write "Number of teacher button was clicked." ' add your other script here End If %> <form name="form1" action="" method="post"> <input type="hidden" name="num_student" value="1"> <input type="submit" value="Number of Student"> </form> <form name="form2" action="" method="post"> <input type="hidden" name="num_teacher" value="1"> <input type="submit" value="Number of teacher"> </form>
hi zippee!
its great, although the sample code is simple but good enough to understand and manipulate...thanks a lot for that one.
![]() |
Similar Threads
- Mouse buttons are messed up (USB Devices and other Peripherals)
- Strange paw print button among IE6's buttons (Web Browsers)
- How can i swap two buttons by clicking on them (Java)
- Memory buttons problem (Java)
- Clicking Buttons to Display different BITMAPS? (C++)
- Use Ctrl+Alt+Del Without Pushing All the Buttons (Windows tips 'n' tweaks)
- IE6 - dialogue boxes , check boxes and radio buttons work very slowly after hijacking (Viruses, Spyware and other Nasties)
- IE6 hijacked - spybot cleared system but start buttons donīt work (Viruses, Spyware and other Nasties)
- Canot get file buttons or menu bars to display in i.e. (Web Browsers)
Other Threads in the ASP Forum
- Previous Thread: pws setup
- Next Thread: Database and ASP loops and hierarachal Data
| Thread Tools | Search this Thread |
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection calendar changeable connection current database databaseconnection diagnostics dreamweaver excel fso html iis microsoft msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption server single specfic sqlserver sqlserverconnection toolkit web webserver windows7





