P
paulsmith5
Hi,
I'm trying to bind a datalist to an XML file to create a menu bar of
sorts. The XML file contains a list of menu items grouped into two main
topic areas see below:
<TOPICLIST TYPE="MenuItems">
<TOPICS TYPE="Type1">
<TOPIC>
<TITLE>Menu 1</TITLE>
<URL>somewhere.aspx</URL>
</TOPIC>
<TOPIC>
<TITLE>Menu 2</TITLE>
<URL>somewhere.aspx</URL>
</TOPIC>
<TOPIC>
<TITLE>Menu 3</TITLE>
<URL>somewhere.aspx</URL>
</TOPIC>
</TOPICS>
<TOPICS TYPE="Type2">
<TOPIC>
<TITLE>Menu 4</TITLE>
<URL>somewhere.aspx</URL>
</TOPIC>
<TOPIC>
<TITLE>Menu 5</TITLE>
<URL>somewhere.aspx</URL>
</TOPIC>
<TOPIC>
<TITLE>Menu 6</TITLE>
<URL>somewhere.aspx</URL>
</TOPIC>
</TOPICS>
</TOPICLIST>
What I'd like to do is to bind a datalist to either those topics of
type Type1 or Type2. At any one time the datalist should show Menu1,
Menu2 and Menu3 or Menu4, Menu4 and Menu6. My datalist comprises of a
linkbutton ItemTemplate and I'm hoping to set the text of the button to
the TITLE in the XML file. Hope someone can help.
Thanks,
Paul
I'm trying to bind a datalist to an XML file to create a menu bar of
sorts. The XML file contains a list of menu items grouped into two main
topic areas see below:
<TOPICLIST TYPE="MenuItems">
<TOPICS TYPE="Type1">
<TOPIC>
<TITLE>Menu 1</TITLE>
<URL>somewhere.aspx</URL>
</TOPIC>
<TOPIC>
<TITLE>Menu 2</TITLE>
<URL>somewhere.aspx</URL>
</TOPIC>
<TOPIC>
<TITLE>Menu 3</TITLE>
<URL>somewhere.aspx</URL>
</TOPIC>
</TOPICS>
<TOPICS TYPE="Type2">
<TOPIC>
<TITLE>Menu 4</TITLE>
<URL>somewhere.aspx</URL>
</TOPIC>
<TOPIC>
<TITLE>Menu 5</TITLE>
<URL>somewhere.aspx</URL>
</TOPIC>
<TOPIC>
<TITLE>Menu 6</TITLE>
<URL>somewhere.aspx</URL>
</TOPIC>
</TOPICS>
</TOPICLIST>
What I'd like to do is to bind a datalist to either those topics of
type Type1 or Type2. At any one time the datalist should show Menu1,
Menu2 and Menu3 or Menu4, Menu4 and Menu6. My datalist comprises of a
linkbutton ItemTemplate and I'm hoping to set the text of the button to
the TITLE in the XML file. Hope someone can help.
Thanks,
Paul