javascript - Adding OnClientClick to a button generated at runtime -
i have created button @ runtime , add onclientclick property of button,to execute javascript function, example alert(), in case. piece of code works in firefox , other browsers not chrome. appreciate here.
button addbutton = new button { text = "test", cssclass = "btn", usesubmitbehavior = false}; addbutton.onclientclick = "javascript:alert('button has being clicked');";
Comments
Post a Comment