Assign Javascript Function in C#

  • Thread starter Thread starter Carl Maloney
  • Start date Start date
C

Carl Maloney

I have a checkbox that is being created dynamically in C# when I load
the page. When it is checked, I want it to run a javascript function.
How do assign a checkbox to launch a javascript function in C#? Thanks
for your help!

Carl
 
myCheckBox.Attributes["onclick"]="myJavacriptFunction()";

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top