Reputation: 63
I'm using MVCContrib and its EmailTemplateService to send html email. Send email works fine but it doesn't seem to dispose email view properly. When I try to redirect to a new Action it gives the following error:
"Cannot redirect after HTTP headers have been sent"
Does anyone know how to fix this problem. Many thanks
Sandra
Upvotes: 0
Views: 2851
Reputation: 171411
Try this:
if (!Response.IsRequestBeingRedirected)
//do the redirect
Upvotes: 1