title: ScriptManager.RegisterStartUpScript(...) not working
body: <p>I've used this command since I start my new project on <code>ImageButton_Click</code> Event, and it's working perfect in every page that I'm using this: I first, check if there's a field empty if yes then I send this <code>alert</code>.  </p>
  
  <pre><code>ScriptManager.RegisterStartupScript(this, typeof(Page), "alert", "alert('No Empty fields are allowed.');", true);  
  </code></pre>
  
  <p>What I'm doing here: I have 2 <code>textboxes</code> that I type two dates, these dates are used to fill my <code>reportviewer</code>, but before it goes to the <code>reportviewer</code>, I check if it's <code>empty</code> or not.  </p>
  
  <p>In this page it's working only in the first time I press the button. I used breakpoint, and it's passing <code>OK</code> throught my conditional <code>IF</code>, but it's not showing the message... Why?<br>
  Full Code on a <code>Button_Click Event</code>:  </p>
  
  <pre><code> if (Txt_Dt_Final.Text == "" || Txt_Dt_Inicial.Text == "")
       {
          ScriptManager.RegisterStartupScript(this, typeof(Page), "alert", "alert('No Empty fields are allowed.');", true);
          Txt_Dt_Inicial.Focus();
          return;
       }
  </code></pre>
  
  <p><strong>UPDATE</strong><br>
  Actually, after I press it by the first time, nothing works anymore... Even if I type a valid date, it is not working... I tested it now and, the error only appears, if the error hapens the first time you press the button.<br>
  e.g.:<br>
  If I type the dates OK, then my reportviewer will return me the result of my report... Then I click on the button with empty textboxes, it will fire the error and show me the message. If I press again it will work fine !  </p>
  
  <p>Now, if I press the button with empty fields for the first time, the button does not work anymore ! It just back working if I refresh the page... Why ? o.O<br>
  All my others pages are working perfect.</p>