Geek Articles

Categories

 

Subscribe

Daily Updates Subscribe geekarticles update via email Subscribe geekarticles update via RSS

 
GeekArticles Database SQL Server

Working with XML Data Using LINQ, a TreeView, and a ListView :: Displaying Data

Author: aspnet.4guysfromrolla.com | Published: 23rd Apr 2008 | Visited: 96 times | Add Comment
Filed in: SQL Server

With more and more data being stored in XML, web applications today commonly need some way to view and edit the data stored in an XML file from a web page interface. If the XML data is relatively "flat" and tabular in nature, we can use data Web controls like the DataGrid, GridView, and Repeater. (See Quickly Editing XML Data for an example of editing XML data through a DataGrid control.) But what if the XML data is more hierarchical and in a less tabular format? Consider a company-wide phone book, which is recursively structured into branches and departments, subdepartments, and so forth. How can this XML data, which can have any number of nodes and any level of children, be displayed and edited through a web page? In this article we will build a web page that displays the contents of a company-wide phone book whose information is encoded in an XML file. The page will recursively display the phone book XML data using a TreeView to list the branches and departments and a ListView to enumerate the employees that belong to the selected branch or department. In particular, the ListView will display the employees that belong to the selected branch or department as well as all the employees that belong to any subdepartments. (In a future article we will look at how to extend the ListView to enable the user to add, edit, and delete phone book entries.) Read on to learn more! Read More >

Read Article
 

Sponsored Links

 


Related Articles

 Swing Extreme Testing - The Data Validation Test The Data Validation Test The Ok button of the SaveAsDialog should only be enabled if the name that has been entered is valid. A name can be invalid if it contains an illegal character, or if it has already been use ...

 Retrieving XML Data Retrieving XML DataTo retrieve XML data from an XMLType table, you can use a SELECT SQL statement, just as you would if you had to query a relational table. For example, to select the employee with the id set to 100 from the employees XMLType table discussed in the preceding section, you might issue ...

 Querying Data with Oracle XQuery Querying Data with Oracle XQuery Starting with Oracle Database 10g Release 2, you can take advantage of a full-featured native XQuery engine integrated with the database. With Oracle XQuery, you can accomplish various tasks involved in developing PHP/Oracle XML applications, operating on any kind of ...

 Breaking up XML into Relational Data Breaking up XML into Relational Data While the preceding example shows how to construct an XML representation over relational data, the example in this section illustrates how you can shred XML data back into relational data. This reverse operation can be useful if your application works with relati ...

 Accessing and Updating Data in ASP.NET 2.0: Using Optimistic Concurrency  Because multiple users can visit the same web page concurrently, it is possible for a user visiting a data modification page to inadvertently overwrite the modifications made by another user. Consider a page with an editable GridView. If two users visit this page simultaneously from different compu ...

 Poor Man's Linq in Visual Studio 2005 A way you can use Linq to Objects in C# 2.0 with .NET Framework ...

 Moving Toward WPF Data Binding One Step at a Time A gradual introduction to the world of WPF data bin ...

 Create Secure Java Applications Productively, Part 1: Use Rational Application Developer and Data St... This is the first in a two-part tutorial series creating secure Java-based Web applications using Rational Application Developer, Data Studio and Rational AppScan. This first tutorial begins by showcasing how Data Studio with pureQuery can increase the efficiency of your database-driven Web developm ...

 Redirect LINQ to SQL DataContext Log Messages To Log4Net An article that shows how one can use Log4Net to capture the log messages that are generated by the LINQ to SQL DataContext cla ...

 ListView Header Sort Direction Indicators Writing an ASP.NET Custom Control which extends the ListView to visually show sort direction for colu ...



Next: Examining ASP.NET's Membership, Roles, and Profile - Part 10



Post Comment

Name:


Email:
 (Optional. Used for Notification)

Title:

 
Comment:


Validation Code:
 <=>  (Enter this code in text box)





Latest Articles

 

Popular Articles

Sponsored Links