如何调用Web服务并使用URL传递参数,并将Html代码返回到该页面 [英] How can I call a web service and pass parameters using the URL, and return Html Code to that page

查看:374
本文介绍了如何调用Web服务并使用URL传递参数,并将Html代码返回到该页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里我想使用Url将三个参数传递给该webservice,



然后该webservice将一些html值返回到此页面

here i want to pass three parameters to that webservice using Url ,

then that webservice return some html values to this page

推荐答案

使用 Ajax ..例如

Use Ajax .. For example
  function WebServiceCallingFunctionName() {


.ajax({
type: < span class =code-string> POST,
url: PageName.aspx / WebServiceMethodName
data: {param:'param'}
contentType: application / json
dataType: json
成功: function (msg){
Osuccessfunctionlogic(msg.d);
});
}
.ajax({ type: "POST", url: "PageName.aspx/WebServiceMethodName", data: "{param:'param'}", contentType: "application/json", dataType: "json", success: function (msg) { Osuccessfunctionlogic(msg.d); }); }







pre 标签添加了正确的语言。

[/编辑]




Added correct language to pre tag.
[/Edit]


你可以传递三个参数...... :)





You can pass three parameters like that.. :)


function CallWebService() {


这篇关于如何调用Web服务并使用URL传递参数,并将Html代码返回到该页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆