Skip to Content
Introducing .NET 4.0: with Visual Studio 2010
book

Introducing .NET 4.0: with Visual Studio 2010

by Alex Mackey
February 2010
Beginner content levelBeginner
400 pages
11h 13m
English
Apress
Content preview from Introducing .NET 4.0: with Visual Studio 2010

11.8. Binding to External Services

Of course, when you are binding to data, you usually want to retrieve it from an external source. The DataView control allows you to easily accomplish this and bind to many different types of services, for example:

  • ASMX web service

  • WCF web services

  • WCF Data Services

  • ASP.NET MVC controller actions

  • JSONP service

  • Basically anything that returns JSON-formatted data

You will now use client templates to bind to ASMX and WCF web services.

11.8.1. Binding to a Web Service (.asmx)

First bind to the web service:

  1. Add a new class called Person to the project, and enter the following class definition:

    public class Person
    {
       public string Name { get; set; }
       public string Age { get; set; }
    }
  2. Add a new .asmx web service to the project ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ASP.NET 3.5 For Dummies®

ASP.NET 3.5 For Dummies®

Ken Cox
ASP.NET 4 Unleashed

ASP.NET 4 Unleashed

Stephen Walther, Kevin Hoffman, Nate Dudek

Publisher Resources

ISBN: 9781430224556Purchase book