You can achieve it by using JQuery, following is some sample code to call code behind method using jquery script
<script type="text/javascript">
$(function () {
debugger;
$.ajax({
type: 'POST',
url: 'Default.aspx/YourMethodName;,
data: "{'args':'test'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
//give alert if u want for success
}
Error:function(msg){
//give alert if ur functuion got some error
}
});
});
</script>
and your method is aspx.cs look like
using System.Web.Services;
[WebMethod]
public static ArrayList YourMethodName(string args)
{
}</pre>