Author: skipper_geffen | Posted on: 4/15/2010 3:07:32 PM | Views : 319

Hey Guys.
Here is the deal - i've added the next line to show a confirmation window after clicking on a button.
both the button and the adding is done in the code-behind :
Button B2 = new Button();
B2.text= "whatever";
B2.Attributes.Add("OnClick","return confirm('Sure about that?');") ;
 
And i've got the button's OnClick event handler working, but for some reason, having the confirmation dialog disables the postback.
What to do?
I've tried-  B2.Attributes.Add("OnClick","PostBack: True") ;
But this will overwrite the first Attributes.Add...
any ideas?
...

Go to the complete details ...