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

c# - Farseer ContactListener is not working -

Automatically create pages in phpfox -

database - one php page with different contents and urls -