tags:

views:

117

answers:

2

Hello, I need to show confirm message box but after some calculations in code? how can I show confirm message at run time? thanks

A: 

On the onClientClick tag (in the aspx file) u can write

confirm('your message');

and onClick tag reference it to function in code-behind where you can write the function which will only be executed on OK click of the messagebox.

This is assuming the question is regarding asp.net

waqasahmed
+1  A: 

Button's OnClientClick event you can write a javascript code like this :

OnClientClick = "return confirm('Are you sure')"

And if users click yes, there will be page refreshing.

Braveyard