title: how to show message box in asp.net
body: <p>I'm using C# to create a website and I'm trying to show a message box.  I'm trying to use JavaScript for this situation and it runs if I do the following:</p>
  
  <pre><code>Response.Write("&lt;script LANGUAGE='JavaScript' &gt;alert('Login Successful')&lt;/script&gt;");  
  </code></pre>
  
  <p>However if instead I do this:</p>
  
  <pre><code>Response.Write("&lt;script LANGUAGE='JavaScript' &gt;alert('Login Successful')&lt;/script&gt;");    
  Response.Redirect("~/admin.aspx");
  </code></pre>
  
  <p>The message box doesn't get shown.</p>
  
  <p>Why is this and how can I fix it?</p>