Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: ASP.NET .NET Binding a DataGrid to an XML file Tutorial

This tutorial will show you how to bind a DataGrid to a simple XML file so you can display the values as rows and the tags as columns.

Tutorial Details:

Binding a DataGrid to an XML file

This tutorial will show you how to bind a DataGrid to a simple XML file so you can display the values as rows and the tags as columns.

Start a new ASP .NET Web Application project. From the Solution Explorer window right click the project and choose Add -> New Item. From the Add New Item window choose XML File . In the name textbox enter Movies.xml . This will be the XML file we will work with and we're going to store information about some movies in it.

Now that it is added to the project, open it. This is the only line you'll find in it:

I suppose you have at least the basic knowledge of the structure of an XML file if you're interested in reading it using ASP .NET and C#.

The code creates a simple DataGrid holding the data from the XML file.
Of course, most of the time you'll want to select the columns which you want to appear in the DataGrid, for example you might not be interested to have a column with the year in which the movie was created, you want just the title and genre.


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
ASP.NET .NET Binding a DataGrid to an XML file Tutorial

View Tutorial:
ASP.NET .NET Binding a DataGrid to an XML file Tutorial

Related Tutorials:

Bean Markup Language, Part 1 - JavaWorld August 1999
Bean Markup Language, Part 1 - JavaWorld August 1999
 
JavaWorld - Net News Central
JavaWorld - Net News Central
 
Adelard, one year later - JavaWorld
Adelard, one year later - JavaWorld
 
Validation with Java and XML Schema, Part 2 - JavaWorld October 2000
Validation with Java and XML Schema, Part 2 - JavaWorld October 2000
 
The magic of Merlin - JavaWorld March 2001
The magic of Merlin - JavaWorld March 2001
 
Use XML data binding to do your laundry
Use XML data binding to do your laundry
 
Is WSDL the indispensable API?
Is WSDL the indispensable API?
 
Rumble in the jungle: J2EE versus .Net, Part 1
Rumble in the jungle: J2EE versus .Net, Part 1
 
Rumble in the jungle: J2EE versus .Net, Part 2
Rumble in the jungle: J2EE versus .Net, Part 2
 
J2EE 1.4 eases Web service development
J2EE 1.4 eases Web service development
 
The Java Web Services Tutorial
This tutorial is a beginner\'s guide to developing Web services and Web applications using the Java Web Services Developer Pack (Java WSDP).
 
XML Document Validation with an XML Schema
This tutorial explains the procedure of validating an XML document with an XML schema.
 
XML Messaging Using JBoss
It\'s common practice to share data using FTP, but an increasingly popular alternative is to use a messaging service. As always, each approach has its own pros and cons, depending on the nature of "what to share," how easy it is to implement the technolog
 
The JDBC RowSet Implementations Tutorial
In "The JDBC RowSet Implementations Tutorial," you will look at how to use the standard JDBC RowSet implementations specified in JSR-114.
 
Simple Object Persistence with the db4o Object Database
Simple Object Persistence with the db4o Object Database. db4o has been chosen for applications in embedded systems in which zero administration, reliability, and low footprint are critical features. In Germany, BMW Car IT, for example, uses it in an embed
 
Generating an XML Document with JAXB
In this tutorial, JAXB is used to generate Java classes from an XML Schema. An example XML document shall be created from the Java classes.
 
Parsing an XML Document with XPath
The getter methods in the org.w3c.dom package API are commonly used to parse an XML document. But J2SE 5.0 also provides the javax.xml.xpath package to parse an XML document with the XML Path Language (XPath) .
 
Open Source Web Frameworks in Java
Open Source Web Frameworks in Java Open Source Web Frameworks in Java Struts Struts Frame work is the implementation of Model-View-Controller (MVC) design pattern for the JSP. Struts is maintained as a part of Apache Jakarta project and is open
 
10 Minutes Guide to Ant
10 Minutes Guide to Ant 10 Minutes Guide to Ant Previous Tutorial Index Next Introduction Well for the next 10 minutes get ready to devote to the ant guide. This will make some sence to the ant. Ant is a free tool under GNU Licence and is
 
Building Web Application With Ant and Deploying on Jboss 3.0
Building Web Application With Ant and Deploying on Jboss 3.0 Building Web Application With Ant and Deploying on Jboss 3.0 Previous Tutorial Index Next In this lesson I will show you how to build you web application and install on the Jboss 3.0
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.