Re: <asp:Menu> Control in Detail? Hi,
I found that this control used for creating menus both horizontal and Vertical..
But My need is to use xmlDataSource and load the content of the node in 'Menu's Datasource.But here you can give only IHierarchial DataSource.Otherwise it shows error.So I gave xmlDataSourceId to DataSourceId of Menu.This is creating whole xml file as Menu.
Consider My sampleXMLFile(test.xml)
<ViewCategory>
<Category>
<Id>1</Id>
<Name>Test1</Name>
<SubName>subTest1</SubName>
</Category>
<Category>
<Id>2</Id>
<Name>Test2</Name>
<SubName>subTest1</SubName>
</Category>
<Category>
<Id>1</Id>
<Name>Test2</Name>
<SubName>subTest1</SubName>
</Category>
</ViewCategory>
From this I want Name to list as a SubMenu Vertically over 'Product.gif' image.How to load the particular node in Menu Control.
My aspx codings is below,
<asp : Menu Id="Menu1" runat="server" DataSourceId="xmlDataSource1"></asp:Menu>
<asp : xmlDataSource Id="xmlDataSource1" runat="server" DataFile="test.xml"/>
Last edited by poornima : 02-12-2008 at 07:30 PM.
|