title: Set require validation , asp.net
body: <p>I have a form with two button and text-boxes,I want to have validation for my text-boxes when I click on button-1 NOT for when I click on Button-2,</p>
  
  <pre><code>         &lt;td &gt;
             &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
          ControlToValidate="TextBox1"
          ErrorMessage="User ID is required."&gt; *
      &lt;/asp:RequiredFieldValidator&gt;
  
            &lt;asp:TextBox ID="TextBox1" runat="server"&gt;     &lt;/asp:TextBox&gt;
  </code></pre>
  
  <p></p>
  
  <p>this method works for all of my button :(</p>