Difference between onclick() and onClientClick()?
<p>If I use both <code>onclick()</code> and <code>onClientClick()</code> can I make sure that server side will be called only after client side function returns TRUE or vice versa?</p>

<p>For example:</p>

<pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %&gt;
&lt;%@ Import Namespace="System.Xml" %&gt;
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

 &lt;%
 protected void save_n_display(object sender, EventArgs e)
 {
    // This must be called when validate() returns true...
 }
 %&gt;

&lt;asp:Button ID="Button1"  OnClientClick="validate()" onClick="save_n _display" "Text="Check" runat="server" /&gt;


&lt;script type="text/javascript" language="javascript"&gt;
    function validate()    // client side Validation is done
    {

    }
&lt;/script&gt;
</code></pre>

<p>So can I use <code>onclick()</code> and <code>onClientClick()</code> or do I need something different for this?
I even tried passing variables from javascript to asp functions so when validate returns true then save_n _display will be called.</p>
