title: asp.net link button preventing postback
body: <pre><code>&lt;asp:LinkButton ID="lbnImages" runat="server" CssClass="link"  
      PostBackUrl="AddImage.aspx" CausesValidation="True"  
      ValidationGroup="Save"&gt;Images&lt;/asp:LinkButton&gt;
  &lt;asp:CustomValidator ID="cstval" runat="server" ControlToValidate="txtName"
      ValidationGroup="Save" ErrorMessage ="Duplicate name"   
      OnServerValidate="Project_validation" /&gt;
  </code></pre>
  
  <p>I am checking for duplicates using the custom validator (server side code)
  If the server side custom validator shows error the link button must not redirect to the page.</p>
  
  <p>I need to stop the post back when the validator fires.</p>