How to write an HTML button which can run both onclick and onserverclick? <p>I have a HTML button which is connected to some external JS and on its onclick events my JavaScript functions would run. The functions consist of some alerts. Now I would like to write my main code which is in C# language but as soon as I write onserverclick event in my button, my onclick events don't work anymore. </p> <p>My button code is:</p> <pre><code>&lt;input runat="server" type="button" id="btn_submit" class="btn_submit" value ="ثبت" onclick="mail_valid()" onserverclick="BtnRegister_Click"/&gt; </code></pre> <p>How can I make both the "onclick" and "onserverclick" event handlers work?</p> <p>Edit: I want to avoid from postback in the button thats why i used html button . </p>