title: Adding a warning message to an aspx page
body: <p>I have an asp.net application in which i have to add a warning javascript message when i click into button in my Gridview:</p>
  
  <pre><code>&lt;asp:GridView ID="GridView1" runat="server"  AutoGenerateColumns="False"&gt;
          &lt;Columns&gt;
          &lt;asp:TemplateField  &gt;
                  &lt;ItemTemplate&gt;
                      &lt;asp:HiddenField ID="Ref"  runat="server" value='&lt;%#Eval("Ref")%&gt;'   &gt;&lt;/asp:HiddenField&gt;
  
                  &lt;/ItemTemplate&gt;
              &lt;/asp:TemplateField&gt;
              &lt;asp:TemplateField &gt;
                  &lt;ItemTemplate&gt;
                      &lt;asp:Button ID="Savebtn" runat="server" Text="update"  OnClick="gv_RowEditing"/&gt;
                  &lt;/ItemTemplate&gt;
              &lt;/asp:TemplateField&gt;
               &lt;asp:TemplateField HeaderText="Note"&gt;
                  &lt;ItemTemplate&gt;
                      &lt;asp:TextBox ID="note"  runat="server" Text='&lt;%#Eval("Note")%&gt;'  onfocus="this.style.color='red'" /&gt;
                  &lt;/ItemTemplate&gt;
              &lt;/asp:TemplateField&gt;
  
              &lt;asp:TemplateField HeaderText="max"&gt;
                  &lt;ItemTemplate&gt;
                      &lt;asp:TextBox ID="maxtxt" runat="server" Text='&lt;%#Eval("prix max")%&gt;' onfocus="this.style.color='red'"/&gt;
                  &lt;/ItemTemplate&gt;
              &lt;/asp:TemplateField&gt;
              &lt;asp:TemplateField HeaderText="min"  &gt;
                  &lt;ItemTemplate&gt;
                      &lt;asp:TextBox ID="mintxt" runat="server"  Text='&lt;%#Eval("prix min")%&gt;' onfocus="this.style.color='red'"/&gt;
                  &lt;/ItemTemplate&gt;
              &lt;/asp:TemplateField&gt;
    &lt;asp:CommandField ShowSelectButton="True" /&gt;
  
  
          &lt;/Columns&gt;
          &lt;EditRowStyle BorderColor="Yellow" Font-Underline="True" ForeColor="#FF3300" /&gt;
      &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>I need to add an alert when i click into the button <code>savebtn</code>, if <code>maxtxt</code> value is less than <code>mintxt</code> value , an warning message appears.</p>
  
  <ul>
  <li>How can i do this?</li>
  <li>What is the differents ways to add an alert message to an aspx page?</li>
  </ul>