Click here to Skip to main content
15,884,986 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all,


I have created a contact us page in HTML.Now I want to send mail from that HTML page.For that I have added an aspx file and the mail was also sending properly.Now my problem is,the code for sending the mail is in the aspx page.After sending the mail,the aspx page is also visible along the HTML pages.How can I close this aspx page automatically after sending the mail.Also I have tried window.close(),But the problem was every time a confirm box with the following dialog is appearing.

The web page you are viewing is trying to close this window.Do you want to close this window?
Is there a way to prevent the confirm box from coming up, and just close it.



Thanking you in advance
Dhanya
Posted

1 solution

This has already been answered in your previous question. You should not create different posts with the same question rather choose 'Improve Question' to add information to your question.


dhanovember wrote:
How can I close this aspx page automatically after sending the mail.


You may consider redirecting to the html page after the mail is sent. Something like
C#
Response.Redirect("~/ContactUs.html");

after the send mail code.

Hope this helps!
 
Share this answer
 

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