I know that I can call a page method with jquery using the following syntax
$.ajax({
type: "POST",
url: "Default.aspx/GetDate",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
// Replace the div's content with the page method's return.
$("#Result").text(msg.d);
}
});
This works for aspx pages but is it possible with ascx pages? (web controls)
I've been trying it for about half an hour and since I can't get it to work I'm wondering if it's even possible.
Note: Just to be clear, when I try to call the ascx page I am updating the url in jquery :)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…