title: stop setting onclick event for asp:LinkButton if no OnClick event was explicitly defined
body: <p>How do I setup a default setting so that if I do not set an OnClick (i.e the asp.net OnClick attribute) explicitly for an asp:LinkButton tag, it will not render an onclick(html attribute for javascript) attribute client side? By default, asp.net adds an onclick='doPostBack....' for the LinkButton.</p>
  
  <p>Case for use: </p>
  
  <p>There is a LinkButton tag on the page. For this page, if the user has one friend, I only want to run client side code if the button is clicked and would not for any reason want to make a post back. If the user has more than one friend I would want a click to trigger a postback.</p>
  
  <p>Solutions that include the following are not helpful:</p>
  
  <ol>
  <li>Using any asp.net Ajaxtoolkit</li>
  <li><p>Dynamically switching the control type (i.e. if friends == 1 use a asp:Hyperlink) 
  -I want to avoid this because it is not scalable. There might be many cases where I want an asp:Link tag to do a postback or to not do a postback depending on the user context or user attributes</p></li>
  <li><p>Using OnClientClick (I am using jQuery would like to avoid this)</p></li>
  </ol>
  
  <p>Solution that would be helpful if possible:</p>
  
  <p>If I could see server side at runtime whether an OnClick event was explicitly set on an asp:LinkButton tag, this would solve my problem, too. any ideas?</p>