Creating Menu using ASP.NET and XML

If you know how to transform an xml document using an xsl style sheet then it is easy to display the menu with the data that is taken from the xml document.

_______________________________________________


_______________________________________________

To create a menu using Asp.Net, you have to create an xml document first. The xml document has to have the items for the menu in an order with provision for the sub menus. After creating this you have to create an xsl stylesheet that is used to transform the xml data into a menu.

In the xsl stylesheet use the XPath to get child nodes of a specific node. The items that are looped like this should be placed in a table and this table has to be placed within a div layer.

After creating such a div layer in the style sheet, you have to create some Javascript code that will hide or show the layers when the user clicks that particular div. You can also use code to change the background when the mouse hovers over the menu item.

Once such an xsl stylesheet is created for the xml file, you can use the XmlDocument object in ASP.Net to create and load the xml file. Similarly create an XslTransform object to load the xsl file. Use the Transform method to transform the xml file into an html that displays the menu.

Instead of using such code to transform, you can also do this in design time by dragging an xml server control to the aspx page and assigning the DocumentSource property to the xml document and the TransformSource property to the xsl document.

Software helps build tabular interfaces. (ThomasNet)
With grouping and filtering capabilities, dhtmlxGrid v1.6 has Smart Rendering functionality that allows component to work with large number of records and features XML string, JSON, HTML, CSV, and JS-array grid initializations. It helps build tabular interfaces and supports custom XML formats by allowing developers to define XML attributes. Dynamic paging feature uses non-linear buffer to make ...



FREE Subscription

Subscribe to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.

Name:
Email:

Note : We never rent, trade, or sell my email lists to
anyone. We assure that your privacy is respected
and protected.

_______________________________________

Recommended XML Books

cover
cover
cover
cover
cover
cover






 

 

FREE Subscription

Stay Current With the Latest Technology Developments Realted to XML. Signup for Our Newsletter and Receive New Articles Through Email.

Name:

Email:

Note : We never rent, trade, or sell our email lists to anyone. We assure that your privacy is respected and protected.

 

 

Add to My Yahoo!


New XML Books Titles - Best Seller's @ Amazon.com

Visit XML Training Material Guide Homepage

Technology helps engage students - how do classroom instruction and social dynamics change when the classroom is completely dependant on modern technology?

Dallas Web Design- local Dallas web design firm offers site design and backend system development