How to show a confirm box with Button Click

  • Thread starter Thread starter ad
  • Start date Start date
A

ad

I can only use the OnClientClick event of a button to show a confirm dialog
like:
OnClientClick="return confirm('Are you sure?');"

Can we show the confirm dialog by progrm, net triggered by a button click?
 
I can only use the OnClientClick event of a button to show a confirm
dialog like:
OnClientClick="return confirm('Are you sure?');"

Can we show the confirm dialog by progrm, net triggered by a button
click?


No, .NET events are handled on the server side - thus you'll need to build
confirmation logic on the server side.

OnClickClick handles events on the client (browser side).
 
Yes, I know.
How can I show a confirm dialog when I need usr's confirm in service
side?


I believe you'll have to build your own - i.e. load a user control with
Yes/No into the page and check for the value.
 
Back
Top