Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Webcontrols & implementing clientside event handlers

Status
Not open for further replies.

ebarratt

Programmer
Apr 10, 2002
53
0
0
US
Hi all,

I am using asp.net webcontrols and wanted to know if I could add html client side event handlers that call javascript functions. For a prime example, I create a webcontrol button, when that is clicked I want it to call a javascript event handler that can return a false value and not have the page post back, or it can post the page back if I return true. I tried to just add the onClick=javascript function directly into the asp:button tag but that didn't work. Is this possible?

Thanks all. *** Any suggestions to my asp.net site would be great if your bored!
 
btn.attributes.add("onClick","return yourFunctionHere();")
penny1.gif
penny1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top