|
-
Feb 10th, 2003, 09:42 AM
#1
Thread Starter
Fanatic Member
Multiple buttons on a form??
I have 2 asp.net buttons. One submits the form but I want the other button
to execute some code without submitting the form.
Is this possible and if so how?
-
Feb 10th, 2003, 11:35 AM
#2
PowerPoster
You just put the code in the click event, and let the event return on it's own. Nothing special you have to do. The page will look like it was submitted, but it will just load up again with the same values as before (except password fields). On the actual submit button, you will process your code, then redirect the user to another page.
If you don't want the page to refresh (go back to the server to run the code), you are going to have to write the code in javascript or vbscript inside the pages html so it won't post back to the server to run the code.
-
Feb 10th, 2003, 12:12 PM
#3
Member
...and don't forget to put your non-submit button's commands in a "If Is NotPostBack Then..." block.
-
Feb 10th, 2003, 12:24 PM
#4
Thread Starter
Fanatic Member
I dont think it will work as Dreamweaver MX operates in a wierd fashion compared to Visual Studio.net.
-
Feb 10th, 2003, 03:56 PM
#5
Fanatic Member
dreamweaver MX is the devil when it comes to asp.net ... well, i suppose it works, but i don't like it one bit compared to vs.net
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|