hello,
i am using dnn 7.2
i want to call code behind function in jquery using ajax call. i have created a custom module in which i am using ajax call.
$.ajax({
type: "POST",
url: 'http://www.mydomain.com/DesktopModules/Admin/Search/view.ascx/GetCurrentTime"',
data:{},
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccess,
failure: function (data) {
alert(data.d);
}
});
on view.ascx.cs:
[System.Web.Services.WebMethod]
public static string GetCurrentTime()
{
}
but i am unable to call this function. all my code is working fine on local but i am unable to do this in DNN. how can i call this method using ajax call.