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');";
 
Back
Top