473,385 Members | 1,396 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,385 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 1031

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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.