473,398 Members | 2,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Binding DataList to XML

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

Dec 14 '05 #1
0 1033

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Barry | last post by:
Hi, I have a Datalist inside the ItemTemplate of another DataList. When I drilldown, I'm not getting any data in either the itemtemplate or headertemplate of the second DataList. I've confirmed...
0
by: ani | last post by:
Hi, I have a datalist control and within the Itemplate I have a radiobuttonlist control . I am binding data to the datalist control in Page_load . Also I have sqldatareader object that needs...
1
by: Laura K | last post by:
Can someone tell me where I went wrong. This is my code for binding data to a datalist. <script language="vb"> Sub Page_Load(Src As Object, e As EventArgs) Dim Con As New...
3
by: bbernieb | last post by:
Hi, All, Is it possible to access a variable inside of a data binding, without the variable being out of scope? (Note: On the DataBinder line, I get an error message that says "Name 'i' is...
5
by: somequestion | last post by:
< uc1:BoardWrite ID="BoardWrite1" CommentId="<%# Eval("CommentId") %>" runat="server" /> this is visual studio 2005 asp.net tag. first it's nor working..but i need this because i will use this...
5
by: Laura K | last post by:
I am having difficulty binding data to my datalist. The data list does not show. I have gone round and round for two days. I could really use some help looking through this code and seeing where...
1
by: npverni | last post by:
I have datalist binding to an arraylist of custom objects (defined in a class "PageItem"). What I am trying to do is access the source PageItem object in an ItemCommand event handler of the...
0
by: AleXmanFree | last post by:
Hi, I have this kind of problem, In my asp.net page i use DataList and user control that is repeated in DataList. This user control has in it a checkbox , so everytime user clicks on checkbox...
2
by: gorantla | last post by:
Hi, I have ta DataTable having 100+ rows,I want Bind to DataList using Server side code simply using the following code in c#. DataList.DataSource=Datatable; DataList.DataBind(); How to solve...
0
by: diff | last post by:
I am having trouble preventing a bound source from updating using event-driven validation. There is a very nice article on MSDN explaining this;...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.