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

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -