Jquery Asp.Net GridView数据绑定

时间:2010-03-15 15:59:41

标签: asp.net jquery gridview

如何调用方法Jquery?

public void GetGrid()
        {
            DataProviderDataContext db = new DataProviderDataContext();
            GridView1.DataSource = db.Employees.ToList();
            GridView1.DataBind();
        }

我不懂英语请帮助

1 个答案:

答案 0 :(得分:0)

这是将页面方法调用到Jquery Ajax

$.ajax({
   type:"POST",
   beforeSend:function(xhr),
   contentType: "application/json; charset=utf-8",
   url:"your page name"/"method name",
   data:"{}",
   dataType: "text",
   success: function(response) { //do something; },
   error: function(XMLHttpRequest, text, error){}
});