Creating dynamic menu in asp using XMLCreating dynamic menu in asp using xml is easy if you know how to get the data from an xml file and also to create an xsl template that is used for the menu. There are tools in the market that would help you to create a template in xsl easily. Use tools like Visual Studio .Net or XMLSpy which are easy in working with xsl files. Tools like XMLSpy also give an option to create an xsl file from the html file you have. This makes your work easier instead of creating the template from the scratch. Extracting data from xml files can be done by working with the xmldom object which has the xml file loaded in it. Use the load method to load the xml file to the xmldom object. If you want to display the content of the xml file you can get the contents and use the xsl file for transforming them in the way you want. For creating menus, all you need is the Text that is displayed and the hyperlink for that text. The text and the hyperlink can be got from the xml file using the xmldom object and the methods available in it. Now the actual job of displaying them like a menu is to work with your xsl template and transform the data that you get from the xml file. You have to work like in the Classic ASP, but in the ASP.Net you have the menu controls that would make your job easier.
|
|
||
|
|||
“Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.”
Copyright - © 2004 - 2019 - All Rights Reserved.