passing paremeter when concume Web Service

  • Thread starter Thread starter kai
  • Start date Start date
K

kai

Hi, All

I try to use a Webservice CustomerOrderHistory to get customer order by
passing a "CustomerID". The Webservice works but the following code



Dim ds1 As DataSet

Dim CustomerID As String

Dim svc As New CustomerOrderHistory.Main

DataGrid1 = svc.GetCustomerOrderHistory(CustomerID = "ALFKI")

DataGrid1.DataBind()



will generate error on

"svc.GetCustomerOrderHistory(CustomerID = "ALFKI")" has a blue under line
says

"Cannot convert to "System.Web.UI.WebControls.Datagrid". What is my problem?



Thanks



kai
 
svc.GetCustomerOrderHistory is not returning a datagrid.
Probably it's returning a dataset.
Maybe you want:

DataGrid1.DataSource = svc.GetCustomerOrderHistory
(CustomerID = "ALFKI")

instead?
 
Back
Top