for calling server side function from html button you need to call like this.
you need to make that function static and mark that with webmethod attribute.
then write javascript function on your design side that will fire a ajax request to call that function from your code behind as you call any webservice function from your side using jquery/javascript ajax request.
Your javascript function look like this.
<script type="text/javascript">
function DeleteData() {
$.ajax({
type: "POST",
url: "Default.aspx/DeleteData",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
alert("Your function called sucessfully");
},
error: function (msg) {
alert("There's some error in calling your function.");
}
});
return false;
}
</script>
and your code behind function like this...
[WebMethod]
public static void DeleteData()
{
}