title: prevent postback form anchor click -> when we have onserverclick attribute
body: <p>my aspx (html) code is like below :  </p>
  
  <p>this is first button (something that should act like a normal button , i used anchor because of some nice css job) :  </p>
  
  <pre><code>                &lt;p id="PaymentParag"&gt;
                      &lt;a id="PaymentLink" onclick="SubmitForm();" name="PaymentLink" runat="server"
                          onserverclick="PaymentLink_Click" alt="Payment" title="Payment"&gt;&lt;/a&gt;
                  &lt;/p&gt;
  </code></pre>
  
  <p>as you see i have some server side code in onserverclick...  </p>
  
  <p>and this is another button :  </p>
  
  <pre><code>&lt;asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" /&gt;
  </code></pre>
  
  <p>and my jquery code :  </p>
  
  <pre><code>    function SubmitForm() {
          $('#form1').submit();
      }
  
      //&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
  
      $(function () {
          $('#form1').submit(function (e) {
              alert('a');
              var error = [false, false, false, false, false];
  
              var text1 = '';
              var text2 = '';
  
              var radtxtEmail = $find("&lt;%= radtxtEmail.ClientID %&gt;");
              text1 = radtxtEmail.get_value();
  
              var radMaskedtxtMobile = $find("&lt;%= radMaskedtxtMobile.ClientID %&gt;");
              text2 = radMaskedtxtMobile.get_value();
  
              var ErrorsInsideMessageBox = $('#ErrorsInsideMessageBox');
              ErrorsInsideMessageBox.html('');
  
              var FormMessages = $('#FormMessages');
  
              if (text1 == '' &amp;&amp; text2 == '') {
                  error[0] = true;
              }
              if (error[0]) {
                  ErrorsInsideMessageBox.append(FormMessages.html());
                  e.preventDefault();
              }
          });
      });
  </code></pre>
  
  <p>clicking on second button causes submit and related postback...<br>
  when error[0] = true we only have submit , not postback...<br>
  so , it seems every thing is normal about second button (regular asp.net button)<br>
  but my problem is about anchor (submit and postback)...<br>
  when i click it we have only postback , not submit , because of adding runat="server" and onserverclick="PaymentLink_Click"...<br>
  so i added onclick="SubmitForm();" for submitting form1...<br>
  but at this time i do n't know why we still have postback when error[0] = true -> e.preventDefault();</p>
  
  <p><strong>edit after comments :</strong><br>
  i replaced that anchor by a link button like below :  </p>
  
  <pre><code> &lt;asp:LinkButton onClientclick="SubmitForm();" ID="PaymentLink" runat="server" onclick="PaymentLink_Click"&gt;&lt;/asp:LinkButton&gt;
  </code></pre>
  
  <p>but i don't know why linkButton does not couse submit (like anchor) so i forced to add onClientclick="SubmitForm();<br>
  after doing this i still have postback when error[0]=true;<br>
  how can i prevent this postback ?  </p>
  
  <p>thanks in advance</p>