Jump to content
Xtreme .Net Talk

Recommended Posts

  • Moderators
Posted

...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 it's server you need to postback, if it's client then add an HTML button and use vbScript or JavaScript.

Visit...Bassic Software
Posted

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)

  • Leaders
Posted
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.
--tim
  • Moderators
Posted

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.

Visit...Bassic Software

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...