Javascript on servecontrol

  • Thread starter Thread starter rehiaa
  • Start date Start date
R

rehiaa

How do I run a javascript on a servercontrol (button). (It has to be a
servercontrol, because I am using CultureInfo on the button)
regards
Rehiaa
 
You can add the attribute at page rendering time from the code-behind.

myServerButton.Attributes ["onclick"] = "alert('Client onclick event');";
 

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