I have a master page with the button on it. I use this master page for my page1.aspx.
When I click the submit button on page1.aspx page (note the button is actually on Master page)..i want to fire OnClientClick and call a Javascript . (I dont think i can use OnClientClick in .Net code behind, so I'm using onClick).
I put that one line of Master.OkButton.Attibutes in "page_load", "page_init" and Page_prerender , i click the submit button but i dont see the
confirm button popping up. ***I tried all 3 locations separately***
what am I missing?
// wire local implementation to master page events Master.OkClick += new EventHandler(Page_OkClick); Master.OkButton.Attributes.Add("onClick", "javascript: return confirm('''');");