more than 1 button on a form??

Just create a sub for the OnClick of that button. Put your code in the Sub (or Function if you want it to return something) and there you go.

Hope that helps!
 
...I want the other button to execute some code without submitting the form...
Do you want to execute the code on the server or client?

If its server you need to postback, if its client then add an HTML button and use vbScript or JavaScript.
 
It is client site problem, not server site, so it is javascript or vbscript problem, not ASP.NET

in VBScript, you can use "form_submit = false".
in JavaScript, you can "onSubmit=return false" in <FORM> tags. (you can write a function to return true/false and pass it to onSubmit event)
 
bungpeng, if you are using an HTML button and just calling some routines, there is no reason to "form_submit = false", because its not even a Submit button.
 
If you read carefully what Venerable Bede mentioned, of course I assume there are 2 submit buttons rather than normal HTML buttons. (because it submitting the form)
 
I think what Robby is getting at is if he *does* have 2 submit buttons then he should probably change it to one submit button and one html button instead of "tricking" a submit button into not submitting.
 
He has 2 ASP buttons, and if you read my first reply, I said change one to regular HTML button, this will allow you to run client side scripts (without submitting).

yeah quwiltw got what I said.
 
Back
Top