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 -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -