You are here : Home » knowledge exchange
we get this type of error when we had used Response.Redirect() method in try block.
try
{
SmtpMail.Send(loMailData);
}
catch (Exception ex)
{
Response.Redirect("failure.html");
}
Response.Redirect("thanks.html");
in this it'll throw an exception beacause we had used Response.Redirect() in try block.Solution :remove the Response.Redirect() from try block and put it after the catch block.
try{
SmtpMail.Send(loMailData);
Response.Redirect("thanks.html");
}
catch (Exception ex)
{
Response.Redirect("failure.html");
}


Copyright © 2005-2012 Narola Infotech, Custom Software & Website Development Company | All Rights Reserved.