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

mhsueh001

Freshman
Joined
Dec 31, 1969
Messages
41
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.
 
Yes. On the code behind, on the page load event you can add a attribute to the button.
Code:
btn.Attributes.Add("onclick", "MyFunctionName();");

The vcscript function will run before the postback.
 
Cassio said:
Yes. On the code behind, on the page load event you can add a attribute to the button.
Code:
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.
 
Back
Top