I have been working on an registeration page for my web site in asp.net.After the person succesfully registers , another page is called which sends an email.After the email is sent it should redirect to the default page . I came accross this error when trying to redirect after sending the email.
"Cannot redirect HTTP headers already sent"
.What could the problem be?
Here is the code
MailMessage mail = new MailMessage();
mail.To =strName ;
mail.From = "GiftWorld@yahoo.com";
mail.BodyFormat = MailFormat.Text;
mail.Subject = "Thank you for registering -Gift World.com";
mail.Body = "Thank you for registering -Gift World.com";
SmtpMail.SmtpServer = "mara.strathmore.edu" ;
View Complete Post