title: serverside onclick but prevent postback in some case
body: <p>I have following serverside onclick method: </p>
  
  <pre><code>protected void btnSearch_Click(object sender, EventArgs e)
  {
      if (txtSearch.Text == "" || txtSearch.Text.Length &lt; 4) {
          //NO POSTBACK HERE
      } else {
          Response.Redirect(www.google.be);
      }
  }
  </code></pre>
  
  <p>So any advice here? I can't do it the clientside way, because I need to give a server side parameter within the url.</p>
  
  <p>Thanks for help</p>