O'Reilly logo

Beginning ASP.NET 3.5 in C# 2008: From Novice to Professional, Second Edition by Matthew MacDonald

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

19.6. XML Data Binding

The Xml control is a great way to display XML data in a web page by converting it to HTML. But what if you want to display data in another type of control, such as a GridView? You could use the XML classes you learned about earlier, which is definitely the most flexible approach. However, if you don't need that much control, you may be interested in the XmlDataSource control, which allows you to take XML from a file and feed it right into another control.

The XmlDataSource control works much like the SqlDataSource control you learned about in Chapter 16. However, it has two key differences:

  • The XmlDataSource extracts information from an XML file, rather than a database or data access class. It provides other controls with ...

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