title: Cannot redirect after HTTP headers have been sent
body: <p>When  I try to redirect to another page through <code>Response.Redirect(URL)</code> am getting the following error:- <code>System.Web.HttpException: Cannot redirect after HTTP headers have been sent.</code></p>
  
  <p>I wrote one <code>Response.Write("Sometext")</code>; and <code>Response.Flush()</code> before calling redirect Method.</p>
  
  <p>In this case how do we use <code>Response.Redirect(URL)</code>? </p>
  
  <p>I'm executing a Stored procedure through Asynch call. The SP will take almost 3 min to execute. By that time I'll get load balancer timeout error from Server because this application is running in Cloud computer. For avoiding load balancer timeout I'm writing some text to browser (<code>response.write()</code> and <code>Flush()</code> ) . </p>