title: How do I display an alert message on my ASP .NET page?
body: <p>This is not working:</p>
  
  <pre><code>try
  {
       EnvironmentVerifier.VerifyAppFoldersAndFiles();
  }
  catch (Exception ex)
  {
       ClientScript.RegisterStartupScript(GetType(), "Error!", "alert('" + ex.Message + "');", true);
       Logger.LogError(ex.Source, ex.TargetSite.ToString(), ex.Message);
       return;
  }
  </code></pre>
  
  <p>When the error occurs, it goes into the catch block but the alert message is not showing up. Am I missing anything?</p>