 <p>Your script is looking for a DOM element with ID "overlay" which does not exist. The id of the button is btnAddUser.ClientID</p> <pre><code>&lt;asp:Button runat="server" ID="btnAddUser" Text="Add Currency Combination" ValidationGroup="valSum2" CssClass="showHide" /&gt; &lt;script type="text/javascript" language="javascript"&gt; $(document).ready(function() { $('&lt;%= btnAddUser.ClientID %&gt;').click(function() { $.blockUI({ overlayCSS: { backgroundColor: '#00f' } }); setTimeout($.unblockUI, 2000); }); }); &lt;/script&gt; </code></pre> <p>Note the removal of OnClientClick!</p> <p>Alternatively you can make this code a named function and type its name in the OnClientClick property. You can also bind by CssClass ( $('.showHide') ) (see @PraveenVenu's answer) but this will bind the function to all elements that use this css class.</p>