title: Separately validate two forms of the same page in asp.net using HTML5 validation
body: <p>I have two forms for login and registration.I am trying to use HTML5 validation. When i click the form to submit login, controls of registration is validated and vice versa.How do I prevent that? I know there is something called validation group but I guess that works only for the validationcontrols provided by .NET.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>&lt;h2&gt;&lt;em&gt; Registration &lt;/em&gt;&lt;/h2&gt;
  
         &lt;asp:TextBox ID="tb_uname" class="login_mem" runat="server"  placeholder="Name" required&gt;&lt;/asp:TextBox&gt; &lt;br /&gt;
         &lt;asp:TextBox ID="tb_address" class="login_mem" runat="server" placeholder="Address" &gt;&lt;/asp:TextBox&gt; &lt;br /&gt;
         &lt;asp:TextBox ID="tb_email" class="login_mem"  runat="server"  placeholder="Email" &gt;&lt;/asp:TextBox&gt; &lt;br /&gt;
         &lt;asp:TextBox ID="tb_pass"  class="login_mem" TextMode="Password"  runat="server" placeholder="Password" &gt;&lt;/asp:TextBox&gt; &lt;br /&gt;
  
         &lt;asp:Button ID="btn_reg" runat="server" Text="Registration" CausesValidation="false"
               onclick="btn_reg_Click"/&gt;
       &lt;/div&gt;
  
        &lt;div id="log"&gt; 
         &lt;h2&gt;&lt;em&gt;Login &lt;/em&gt;&lt;/h2&gt;
  
         &lt;asp:TextBox ID="tb_name" class="login_mem" runat="server" placeholder="username" required&gt;&lt;/asp:TextBox&gt; &lt;br /&gt;
  
         &lt;asp:TextBox ID="tb_password" class="login_mem" runat="server" placeholder="password"&gt;&lt;/asp:TextBox&gt;&lt;br /&gt;
  
          &lt;asp:Button ID="btn_log" runat="server" Text="Login" onclick="btn_log_Click"/&gt;
          &lt;asp:Label ID="error" runat="server"&gt;&lt;/asp:Label&gt;
  
       &lt;/div&gt;
  </code></pre>