asp.net postback
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/159523/why-do-i-get-cannot-redirect-after-http-headers-have-been-sent-when-i-call-res">Why do I get &ldquo;Cannot redirect after HTTP headers have been sent&rdquo; when I call Response.Redirect()?</a>  </p>
</blockquote>



<p>Can I do something like this :</p>

<pre><code>Response.Write(displaying some gif);

Response.Flush();

Thread.Sleep(6000);

Response.Write(@"&lt;script&gt;document.getElementById('loading').style.display='none';&lt;/script&gt;");

Response.Buffer = true;

Response.Redirect("some URL")
</code></pre>

<p>Because I get this exception Cannot redirect after HTTP headers have been sent if I try.Can anyone help me out how to do this?</p>
