How to show a confirm box with Button Click

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?
 
L

Lucas Tam

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).
 
L

Lucas Tam

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top