You cannot do a Response.Redirect after sending anything to the client. Once
you Response.Write, you are hosed on this.
The solution is to Response.Write, then Flush(), but do not finish the page.
When the email is sent, Write a JavaScript block to the client to redirect to
a new page.
---
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"Julia" wrote:
Hi,
My ASP.NET send an email and it is taking some time,
I would like to display a message to the user
Here is my code
Response.Write(Configuration.AppSettings["message"]);
Response.Flush();
//Send the email
EmailDispatcher dispatcher=new EmailDispatcher();
dispatcher.Execute( this.Request.QueryString["pwd"],this.Request.Form);
i understand that that is wrong since i get an error saying that i cannot
redirect afterh HTTP headers was sent
Thanks in advance.