I am trying to call a method that is in a User Control from clientside using ajax/jquery. My ajax looks something like this:
function starClick(starIndex) {
$.ajax({
type: "POST",
url: "ItemPage.aspx/postRatingProxy",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
document.getElementById("testAjax").innerHTML = msg.d;
}
});
}
My page method look something like:
[WebMethod]
public static string postRatingProxy()
{
return .......postRating();
}
Then the User Control Method looks something like:
public static string postRating()
{
return "git er done";
}
I saw this method being suggested somewhere. Although Im very lost as to how to retrieve my UserControl method from the Page method when its static. Is it possible to retrieve the UserControl from the static method or did I just run into a dead end?