BizTalk Utilities CV ,   Jobs ,   Code library  
 
Home Page
.NET and XML
ASP.NET XML Architecture
Code to create entire file system as XML File in VB.NET
Class object for Base64 conversion with .NET
XML Web Services and ASP.NET
String Handling Application using ASP.NET
XML Serialization and .Net
Dynamic Method Invocation in .NET using Reflection API
Using XML classes in .Net
Pass node sets to XSLT stylesheets using .NET
Output a directory as XML using .NET
.Net, COM Interoperability and Word Object Model
WS-Routing for .NET endpoints
Using XML and XSLT in VB.NET Jeopardy
Symmetric Encryption/Decryption with .NET
XInclude.NET 1.0
EXSLT.NET 1.0
How to read a XML file using XmlTextReader?
How to compare a XML element with XmlTextReader?
How to verify if an element is empty with XmlTextReader and IsEmptyElement?
How to check if the XML elements contains any attributes with XmlTextReader
<< XSLT
 

By :Mark Wilson
I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :03/24/2008
Times viewed :284

 

Data with a TreeView

Transforming XML to HTML with XSLT stylesheets is a good option if the HTML pages are relatively static. If the generated web pages leverage DHTML effects to a large degree or if we need to process user input then server-side controls offer a much better programming model. With server side controls we can process user input through event notifications, you will see what I mean shortly. ASP.NET provides a great framework to handle the notifications, which makes writing interactive very pages very simple. Building interactive pages with XSLT would by-pass that framework and we have to write server-side and client-side code to process user events by hand.

Introducing the TreeView

The next server-side control we examine closer is a TreeView. I think you are familiar with tree view controls because you use them on a regular basis. The MSDN web site, for example, presents the contents of the documentation library in a web based tree view, shown in figure 17.8. Initially this Tree View only displays the top level of library categories. You click on the area of articles you are looking for and the tree expands to show more choices for that area. The new choices can also lead to more choices or they can link to articles in the library.


Figure 17.8: The MSDN web site displays the available library categories in the tree view on the left hand side of the page.


Since a tree view naturally maps to hierarchical structures, it is very well suited to display data from XML documents. It is also well suited for web based applications because we do not have to populate the entire tree right away. We can populate only the displayed tree nodes to reduce the amount of data going from the web server the browser, which reduces transfer time and speeds up the rendering of the page in the browser.

There are several different Tree View controls available for ASP.NET. The Microsoft TreeView Web Control we are working with in this section is not distributed with the .NET Framework, but it is available as a free download on the MSDN website at http://msdn.microsoft.com/library/default.asp?url=/workshop/webcontrols/webcontrols_entry.asp. This control only displays properly in Internet Explorer, but it works nicely with XML data because it allows binding XML documents to build the tree.



Rate this article on a scale of 1 to 10

Your vote :  


 

Recent Jobs

Sr. Software Engineer - Analytics
Immediate Mainframe openings for Ch
Immediate TANDEM-TAL openings for C
Immediate ASP.NET/C# Openings for C
Sr. Software Engineer

View all Jobs (Add yours)
View all CV (Add yours)



swimming pool contractor
halloween mask
water softener
Teleconference
Host Department NOLIMIT Web Hosting
MSN
sunglasses
fax server


    Email TopXML  

Front Page Daily Stuff TopXML Forum XML blogs XML Newsgroups BizTalk Biztalk Utilities Biztalk Utilities Tutorial B2B SAP XML Microsoft .NET Dotnet System XML Soapformatter SQLXML XMLserializer XQuery PHP PHP SimpleXML PHP XML Dom PHP XML RPC PHP XSLT Java Java Java XML Xalan Microsoft ASP ASP Schemas XML SQL Server XML XMLDom XSL XSL Tutorial XSLT Stylesheets General Javascript CSS XHTML WAP