开发者

Working with menu

I did a dynamic menu using xmdatasource. It doen't work but I'm not sure where I'm going wrong.

 <asp:XmlDataSource ID="xmlsource1"
   runat="server" DataFile="~/menu.xml"></asp:XmlDataSource>

<asp:Menu ID="dymenu1"  runat="server" DataSourceID="xmlsource1" Orientation="Horizontal">
  <DynamicMenuStyle BackColor="#228B22" />
  <StaticSelectedStyle BackColor="#FFBB77" />
  <DynamicSelectedStyle BackColor="#FFAA99" />
  <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
  <StaticHoverStyle BackColor="#abcdaa" Font-Bold="False" ForeColor="White" />
  </asp:Menu> 

Thi开发者_如何学JAVAs is the xml file

 <Menu text="Issue1" url="Issue1.aspx">
<MenuItems>
<MenuItem text="Concept1" url="Concept1.aspx"></MenuItem>
<MenuItem text="Concept2" url="Concept2.aspx">
  </MenuItem>
<MenuItem text="Concept3" url="Concept3.aspx"></MenuItem>
</MenuItems>
</Menu>
 <Menu text="Issue2" url="Issue2.aspx">
<MenuItems>
<MenuItem text="Problem1" url="Problem1.aspx"></MenuItem>
<MenuItem text="Problem2" url="Problem2.aspx"></MenuItem>
</MenuItems>

can u please let me know where I'm going wrong?


You must define the DataBindings property so the Menu control knows on which fields to perform binding.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜