passing paremeter when concume Web Service

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
 
J

Jon Paugh

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

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

instead?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top