Make a server side but put up a Confirm MsgBox

R

Rod

I have a server side button that deletes something. I want to put up a
Confirm MsgBox that says "Do you really want to delete this?"
I know how to make a client side button put up this message but I can't see
how to get a server side button to do it.

Many thanks in advance
Rod
 
R

Rod

Easy when you know how.

thanks




David Longnecker said:
In your code behind, you can still use JavaScript.

Given you have a button object called btnDelete:

Add the following to your Page_Load.

btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you want
to delete?');");

-dl
 

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,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top