PratikShah111
asked on
confirm message box asp.net
I have a pop up screen with save and cancel button.
When the user clicks on cancel button I want to do the following
if (allconditionstrue)
{
show confirm message box.
if the user clicks yes , close the pop up
if user clicks no, close the message box and keep pop up open.
}
else
{
close pop up
}
When the user clicks on cancel button I want to do the following
if (allconditionstrue)
{
show confirm message box.
if the user clicks yes , close the pop up
if user clicks no, close the message box and keep pop up open.
}
else
{
close pop up
}
ASKER
this is not correct. code is not compiling. "confirm" needs to be defined
corrected :
if(allconditionstrue)
{
if( confirm("do you really want to?") ) {
// yes close the pop up
} else {
// no close the message box and keep pop up open.
}
} else {
//close pop up
}
ASKER
leakim971 I am still getting the same error for "confirm"
ASKER
are you give me javascript code or C# codebehind. I prefer doing this in C# codebehind. I want this code to be part of a button click event
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
so not sure why you put JavaScript tag here...
Open in new window