Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ASP.Net - How do I return the value from this.btnDelete.Attributes.Add("onclick","if(confirm('Are you sure you want to delete this Equipment Request?')){}else{return false}");

Posted on 2003-12-01
2
Medium Priority
?
320 Views
Last Modified: 2006-11-17
I have the following code
            this.btnDelete.Attributes.Add("onclick","if(confirm('Are you sure you want to delete this Equipment Request?')){}else{return false}");


When the btnDelete is clicked How do I 'trap'  if the true or false on a confirmation screen?
0
Comment
Question by:JElster
2 Comments
 
LVL 2

Accepted Solution

by:
yleviel earned 150 total points
ID: 9853536
what do you mean by 'trap'?

Do you mean you want to stop the form from continuing to post?  If so, consider changing the code to:

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

Expert Comment

by:negreteo
ID: 13384751
How do I know that the user clicked Yes or No?
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question