Jump to content
Xtreme .Net Talk

Is there a way to run both a vbscript and a codebehind method


Recommended Posts

Posted

Is there a way to run both a vbscript sub and a codebehind method with only one button click?

 

I've got a button that needs to runs some client side code, then run some server side code.

 

 

Any help would be appreciated.

Posted
Yes. On the code behind, on the page load event you can add a attribute to the button.

btn.Attributes.Add("onclick", "MyFunctionName();");

 

The vcscript function will run before the postback.

 

Nope, that didn't work I'm already using the Onclick event to execute the vbscript routine. Also I'm using a HTMLbutton because the script I'm trying to run is for an activex control.

 

thanks though.

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...