Calling a Web Service
Hi,
I need to know how to call my Web Service from a aspx page.
at the moment I have:
-----------------------------------------------
localhost.GetNewStockInfo myLocalhost= new localhost.GetNewStockInfo();
DataSet DSService = null;
DSService = GetNewStockInfo.ShowMakes();
dgrDataGrid.DataSource = DSService;
dgrDataGrid.DataBind();
--------------------------------------------
(where 'localhost' is the service, 'GetNewStockInfo' the class, and 'ShowMakes' a method.)
However, I get the message below when trying to compile:
c:\inetpub\wwwroot\peteapp1\WebServiceExample.aspx .cs(31): An object reference is required for the nonstatic field, method, or property 'peteapp1.localhost.GetNewStockInfo.ShowMakes()'
Any help greatly appreciated,
Thanks,
Pete M
|