page_load(object sender,EventArgs) { Button1.Attributes.Add("onClick","alert('button1 clicked');"); }
<asp:Button ID="Button1" runat="server" onclientclick= "javascript:alert('i am clicked')" Text="Click me" />
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)