Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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:
C#
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();
    }

I need to do same through jquery.How can I write this in script?
Posted
Updated 31-Mar-11 2:05am
v2
Comments
Sandeep Mewara 31-Mar-11 8:06am    
Always use PRE tags to format your code part. It makes the question readable.

1 solution

 
Share this answer
 
Comments
Dylan Morley 31-Mar-11 8:46am    
yeah - nice article

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900