Get confirmation from user????

G

Guest

Hi all,

I am writing a page that requires a decision from the user, e.g. when the user clicks delete I need a message box to popup and ask the user for confirmation Depending on the users response will depend on whether the ASP.Net delete function is called. I am able to register a Client-side script enough to show a msgbox, but only with an okOnly button, and even if I got a YesNo button to display, is there any way to inject that decision into my ASP.NET code?

This is really causing me a headache so any help with this would be greatly appreciated

Thanks

Karl
 
J

Jurjen de Groot

Karl,

Add the following code to your app in the Page_Load for instance .. :

btnDelete.Attributes.Add("onclick", "return (confirm("Delete this item
?")==true) ;")

Kind regards,

Jurjen de Groot,
Netherlands



Karl said:
Hi all,

I am writing a page that requires a decision from the user, e.g. when the
user clicks delete I need a message box to popup and ask the user for
confirmation Depending on the users response will depend on whether the
ASP.Net delete function is called. I am able to register a Client-side
script enough to show a msgbox, but only with an okOnly button, and even if
I got a YesNo button to display, is there any way to inject that decision
into my ASP.NET code?
 

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

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top