I am creating an application using ASP.Net, in which I have a HTML button on an aspx page.
The easiest way to accomplish this is to override the RaisePostBackEvent method.
And in your JavaScript:
raisePostBack = function(){
__doPostBack("<%=btnRaisePostBack.ClientID%>", "");
}
And in your code:
protected override void RaisePostBackEvent(IPostBackEventHandler source, string eventArgument)
{
//call the RaisePostBack event
base.RaisePostBackEvent(source, eventArgument);
if (source == btnRaisePostBack)
{
//do some logic
}
}