Click here to Skip to main content
15,912,457 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am making an application that triggers email after taking confirmation on a linkbutton click.

C#
function DisableLink()
{

btnSendEmailAllLang = confirm("Are you sure you want to send email in all languages?");

           if(blnSendEmailToAll)
           {
               return true;
           }
else
{
-------------Dont know how to implement here
}


The application triggers the mail if on click of 'OK' button of confirmatory pop up.

I have a doubt. I want that that the application should stay on the same page without performing any task if the user clicks on 'cancel' button of the confirmatory pop up that appears.

Don't know how to implement it...

Need some help

Thanks
Posted
Updated 13-Feb-11 20:23pm
v2
Comments
Sandeep Mewara 14-Feb-11 3:11am    
Sounds like web but not tagged as ASP.NET. Kindly confirm.

1 solution

In that case, you do not need the else block at all.

Edit: Where are you calling the method which actually sends the email? Are you checking the value of your boolean before calling that method?
 
Share this answer
 
v2
Comments
Aksh@169 14-Feb-11 2:08am    
But when I am clicking the 'Cancel' button of the confirmatory pop up,it is still performing the task of sending emails:(

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900