ngocquy_ytc
16-05-2009, 12:30
Em có 1 cái WebService có phương thức GetCustomer() kiểu trả về là Dataset.
Em tạo 1 trang web(Gồm 1 button,1 GridView) để gọi phương thức GetCustomer() từ WebService nhưng chạy thì nó ko hiện lên dữ liệu.
Em thử chạy WebService để Test thì nó có kết quả:
Code use WebService như sau:
protected void btnView_Click(object sender, EventArgs e)
{
Service.Service a = new Service.Service();
GridView1.DataSource= a.GetCustomer().Tables["Customers"];
GridView1.DataBind();
}
Code trên có sai gì ko mấy anh. Có code nào để Bind dữ liệu nữa ko mấy anh
Em tạo 1 trang web(Gồm 1 button,1 GridView) để gọi phương thức GetCustomer() từ WebService nhưng chạy thì nó ko hiện lên dữ liệu.
Em thử chạy WebService để Test thì nó có kết quả:
Code use WebService như sau:
protected void btnView_Click(object sender, EventArgs e)
{
Service.Service a = new Service.Service();
GridView1.DataSource= a.GetCustomer().Tables["Customers"];
GridView1.DataBind();
}
Code trên có sai gì ko mấy anh. Có code nào để Bind dữ liệu nữa ko mấy anh