Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 28th, 2004, 08:45 AM
Authorized User
 
Join Date: Apr 2004
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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







Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling Axis web service from .NET client Koushik .NET Web Services 4 April 2nd, 2010 09:16 PM
Calling Web Service from COM+ application over HTT TTHEO .NET Web Services 0 March 28th, 2008 06:17 PM
Calling Axis Web Service from VB.NET - XML distort Koushik VB.NET 0 October 28th, 2006 07:32 AM
Calling Axis web service from .Net - XML Exchange Koushik .NET Web Services 0 October 23rd, 2006 11:40 AM
Calling windows app from web service .. André G.Agayby Classic ASP Basics 1 August 1st, 2005 05:57 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.