Answer: By writing following code,we can call JS function through Button control or Linkbutton,ImageButton etc..
Syntax:-
Button1.Attributes.Add("onclick", "return JSFunction();");
For Example:-
Button1.Attributes.Add("onclick", "return setborder();");
Asked In: Many Interviews |
Alert Moderator