使用Jquery AJAX在母版页中调用方法 [英] call Method in master page using Jquery AJAX
本文介绍了使用Jquery AJAX在母版页中调用方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用JQUERY AJAX从母版页调用webmethod.但是该方法未执行,请帮助.
参见下面的代码
$.ajax( { //call the Page method using JQuery ajax type: "POST", url: "DefaultMaster.master/UpdatePollCount", data: data, contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) //show the result { $("#divPoll").css("cursor", "default"); //remove the wait cursor $("#btnSubmit").attr("disabled", "false") //enable the Vote button $("div[id$=divAnswers]").fadeOut("fast").html(msg.d).fadeIn("fast", function () { animateResults(); }); } });
解决方案
.ajax( {//使用JQuery ajax调用Page方法 输入:"POST", url:"DefaultMaster.master/UpdatePollCount", 数据:数据, contentType:"application/json; charset = utf-8", dataType:"json", success:function(msg)//显示结果 {
(#divPoll").css("cursor","default"); //删除等待光标
(#btnSubmit").attr("disabled","false")//启用投票"按钮
>
hi
i am trying to call webmethod from masterpage using JQUERY AJAX.but the method not executed please help.
see the code below
$.ajax( { //call the Page method using JQuery ajax type: "POST", url: "DefaultMaster.master/UpdatePollCount", data: data, contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) //show the result { $("#divPoll").css("cursor", "default"); //remove the wait cursor $("#btnSubmit").attr("disabled", "false") //enable the Vote button $("div[id$=divAnswers]").fadeOut("fast").html(msg.d).fadeIn("fast", function () { animateResults(); }); } });
解决方案
.ajax( { //call the Page method using JQuery ajax type: "POST", url: "DefaultMaster.master/UpdatePollCount", data: data, contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) //show the result {
("#divPoll").css("cursor", "default"); //remove the wait cursor
("#btnSubmit").attr("disabled", "false") //enable the Vote button
这篇关于使用Jquery AJAX在母版页中调用方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文