O'Reilly logo

Sams Teach Yourself ADO.NET in 24 Hours by Paul Bertucci, Jason Lefebvre

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sending a DataSet Using Web Services

To create a Web service, create a file in your Web project entitled suppliers.asmx. The .asmx extension tells the .NET Framework that this file should be treated as a Web service. Copy and paste the code from Listing 24.1 (or Listing 24.2 if you prefer C#) into the file and save. That's it! You've created your first Web service, which you can view in a browser by navigating directly to the suppliers.asmx URL.

Let's take a moment to the look at the Web service itself. Notice that the very first line of the file is a WebService directive. Up to this point, you have only seen a Page directive in that location. Notice also that the class of the Web service is provided in the WebService directive.

Next, several ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required