我们可以通过Ajax-jQuery调用使用查询字符串在Web服务中调用Web方法吗?
问题描述:
Hello Everyone,
是否可以使用查询字符串调用Web方法!!
实际上我正在创建一个jQgrid,我想调用我在Web服务中创建的Web方法。
如果有任何机构知道怎么做,请告诉我这个方法
Hello Everyone,
Is it possible to call a Web Method using Query String!!
Actually I am creating a jQgrid and I want to call my Web Method which is created in Web Service.
If any body knows how to do this than please tell me a way for this
答
请访问以下链接,希望你能得到答案。
从Jquery使用Jqgrid调用跨域WebService(asmx) [ ^ ]
http://stackoverflow.com/questions/10779576/jq-grid-web-service-call-with-parameters-doesnt-work-does-with-ajax [ ^ ]
http:// stackoverflow .com / questions / 3410555 / jqgrid-calling-webservice-asmx-using-json [ ^ ]
如果您遇到任何问题,请写下来。
谢谢
Please visit below links, hope you will get your answer.
Call Cross Domain WebService(asmx) from Jquery with Jqgrid[^]
http://stackoverflow.com/questions/10779576/jq-grid-web-service-call-with-parameters-doesnt-work-does-with-ajax[^]
http://stackoverflow.com/questions/3410555/jqgrid-calling-webservice-asmx-using-json[^]
If you are getting any issue then write it.
Thanks
查看此示例
See this example
.ajax({
cache: false ,
type: 获取,
async: false ,
url: location .protocol + // + location .host + / Report / Report, // 这里你的api地址
成功: function (数据){
// 使用您的结果(数据)
}
});
.ajax({ cache: false, type: "GET", async:false, url: location.protocol + "//" + location.host + "/Report/Report", // here your api address success: function (data) { // use your result (data) } });