OnClientClick preventing OnClick event?
<p>I have a button, I need to fire an onclick event, and an onclientclick event. The onclientclick would be something like this:</p>

<pre><code>(function($){
$.fn.validate = function()  {
    var option = $('#&lt;%=LblWarnings.ClientID%&gt;').html();   
        if (option == "option1_OK" ||
            option == "option1_OK")  
            alert(wrong);
        else {
            $('#&lt;%=LblWarnings.ClientID%&gt;').html("Incomplete");
            alert(wrong);}        
    };
})(jQuery);
</code></pre>

<p>Validating function, checks the text of a label, if condition's true it should go on and execute the OnClick event. And if it's false, it should NOT FIRE the code behind (method called WriteInfo in my .cs file, but just update a label so the user knows something was wrong while he was submitting data.</p>

<p>Is it possible for the onclientclick to stop the onclick event? If so, could you help me providing me the asp:button sentence so I can trigger both events.</p>

<p>Thanks.</p>

<p>After trying Adil Answer, I get an error "object expected"</p>

<p>Maybe there's something wrong the way I'm calling the function?</p>

<pre><code>&lt;asp:Button ID="ButtonRadioValue" CssClass="customButton" runat="server" onclick="WriteInfo" OnClientClick="validate();" Text="Accept" /&gt;
</code></pre>
