I have created Class under App_Code folder there i have created method. I need to call that class method using JavaScript from Sample.aspx file.
Class:
namespace ContactBook.App_Code
{
//The function need to call...
public class ContactBook_functionalities
{
public static bool MyFunction(string email, string contact)
{
//Code...
}
}
}
JavaScript:
<script type="text/javascript">
function callMyFunc(email, contact)
{
//var x = MyFunction(string email, string contact);
}
</script>
[WebMethod] is not working for Class functions.