使用jQuey消耗WCF服务,该服务返回Datatable [英] consume WCF service using jQuey which return Datatable
本文介绍了使用jQuey消耗WCF服务,该服务返回Datatable的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将后端绑定为sql server的网格.我在WCF服务中编写了功能,并通过添加Web引用在 .aspx 页中使用了该服务.它正在工作,但我想通过jQuery使用我的WCF服务.
我该怎么用?
我像这样使用Codebehind( .aspx.cs ):
Hi,
I bind the grid where backend as sql server.I wrote functionality in WCF service and consume that service in .aspx page by adding web reference.It is working but i want to consume my WCF service through jQuery.
How can i use that?
I use Codebehind(.aspx.cs) like this:
using HOST;
using System.Data;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
FillGrid();
}
}
void FillGrid()
{
MyClass MObj = new MyClass();
DataTable Dtl = new DataTable();
Dtl = MObj.GetCustomers();
GridView1.DataSource = Dtl;
GridView1.DataBind();
}
我需要通过jquery进行相同的操作.如何在脚本中编写此代码?
I need to do same through jquery.How can I write this in script?
推荐答案
^ ]
这篇关于使用jQuey消耗WCF服务,该服务返回Datatable的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文