title: ASP.NET - How to display javascript alert using C#?
body: <p>I have a page that contains a textbox and button, when the user clicks the submit button I want to display a message based on a bool value.</p>
  
  <p>I have researched on stackoverflow and tried the code in this questions: <a href="https://stackoverflow.com/questions/782354/asp-net-webform-display-alert-and-redirect">Asp.net Webform Display Alert and redirect</a></p>
  
  <p>But it didn't work. I have the following code:</p>
  
  <pre><code>ClientScript.RegisterStartupScript(this.GetType(),"", "alert('message')", true);
  </code></pre>
  
  <p>What code do I need to display the alert message?</p>