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 26th, 2006, 11:51 PM
Registered User
 
Join Date: Apr 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Call a Web Service

Hi,

I am using ASP.NET Web Application with C#

I have created a Web Service containing one method.
This method has an input parameter (String) and returns a dataset.
I checked the Web Service and it works absolutely fine.

Now I have to call the method of this web service from my web application on click of a button and populate a datagrid from the returned dataset.
How can I achieve this.

Thanks in advance,

Regards,
Reema Shahbazkar.
 
Old April 28th, 2006, 10:12 AM
Authorized User
 
Join Date: Feb 2005
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You will have to add a reference to the web service in your aspx file.

You can then create an object from that reference, whos method(s) you can invoke. In your case, you can declare a dataset in your aspx to receive the dataset returned from your web service, with which you can bind your datagrid.

unfortunately I work with VB, not C# so I cannot give you an example of how to achieve this.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Web service call error Tomi J2EE 0 February 1st, 2008 06:22 AM
Javascript library to call a web service? markguy Javascript How-To 0 May 24th, 2007 05:52 PM
Web Service call fails gurujeet .NET Web Services 10 December 18th, 2006 06:28 PM
How to call WMI from web service? yezh99 .NET Web Services 1 July 22nd, 2003 11:58 PM
How to call WMI from web service? yezh99 VS.NET 2002/2003 1 July 14th, 2003 10:45 AM





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