473,320 Members | 1,828 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,320 software developers and data experts.

ASP.net Datalist and displaying XML data

Hello,

I have a Datalist control that I am currently
displaying data from a XML file. File example below.
Expand|Select|Wrap|Line Numbers
  1.   <Member>
  2.     <FirstName>James</FirstName>
  3.     <LastName>Sattler</LastName>
  4.     <Address>KTP</Address>
  5.     <City>Louisville</City>
  6.     <State>KY</State>
  7.     <Zipcode>40223</Zipcode>
  8.     <AdditionMembers>
  9.       <newmem0>Brian Hasken Medium</newmem0>
  10.       <newmem1>Jim Pollen Large </newmem1>
  11.       <newmem2>Don Rosser XXL</newmem2>
  12.  
  13.     </AdditionMembers>
  14.  
Expand|Select|Wrap|Line Numbers
  1. <ItemStyle Wrap="False" Width="10px" Font-Bold="False" Font-Italic="False" 
  2.             Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ItemStyle>
  3.         <SeparatorStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" 
  4.             Font-Strikeout="False" Font-Underline="False" Wrap="False" />
  5.  
  6.      <HeaderTemplate>
  7.             Family Members
  8.  
  9.             </HeaderTemplate>
  10.         <ItemTemplate>
  11.               <b> First Name:</b><%#XPath("FirstName") %> <br />
  12.              <b> Last Name:</b><%#XPath("LastName") %><br />
  13.             <b> Address:</b><%#XPath("Address") %><br />
  14.             <b>City:</b><%#XPath("City") %><br />
  15.              <b> State:</b><%#XPath("State") %> <br />
  16.               <b> ZipCode:</b><%#XPath("Zipcode") %> <br />
  17.               <b>Additional Members:</b><br />
  18.             <asp:Label ID="Label2" runat="server" Text='<%#XPath("AdditionMembers") %> '  Width="1px"></asp:Label> 
  19.               <br />
  20.  
  21.         </ItemTemplate>
  22.     </asp:DataList>
  23.  
  24.  
When I display this data in my
Datalist control, it looks this.

First Name:James
Last Name:Sattler
Address:KTP
City:Louisville
State:KY
ZipCode:40223
Additional Members:
Brian Hasken MediumJim Pollen Large Don Rosser XXL

What I want to do is, under "Additonal Members" I want
each Additionmember child to start on a new line.

Something like this.
First Name:James
Last Name:Sattler
Address:KTP
City:Louisville
State:KY
ZipCode:40223
Additional Members:
Brian Hasken Medium
Jim Pollen Large
Don Rosser XXL
Oct 14 '10 #1
0 1070

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Yoshitha | last post by:
hi I have datalist control in my ASP.NET application the problem here is i have used a textbox with multiline true propertly when i enter data like "fdjsfhjksdhfjsdfhsdjhfsdfhsdjfhsd...
3
by: vinayak | last post by:
Hi I am displaying data in Datagrid in ASP.NET with Edit/Update functionality for each row. On the same page I have 2 Button controls which submits the request to server. These button controls...
1
by: Yoshitha | last post by:
Hi I have datalist control in my ASP.NET application the problem here is i have used a textbox with multiline true propertly when i enter data like "fdjsfhjksdhfjsdfhsdjhfsdfhsdjfhsd...
1
by: Simon Cheng | last post by:
When I tried to display data in datalist and repeater, the first data item always disappears in all datalist and repeaters in my web forms. The code I use for the html page is: <TD...
2
by: p.mc | last post by:
Hi all, I'm using asp.net to display data from a SQL Server database, I've managed to display the data using dataGrids but now need to have more control over the display of the data. I'd like...
1
by: slayerx | last post by:
Quote: Originally Posted by comteck As far as I know, a report is just that.. a means of displaying data. I don't believe it is possible to make a selection in a report. You can however, make a...
1
by: Death | last post by:
Hi all I am having some trouble on displaying datagrid data from my database as i am a beginner for this The error is when calling the DBCommand . It show incorrect syntax near User. But User...
1
by: seadog | last post by:
Hi, I am having a problem displaying data in a textbox array. What I am trying to do is have 5 number enter 5 textboxes, starting from the first and working there way to the bottom textbox. What...
6
by: jaredciagar | last post by:
Hi Guys Can you help me please in my project, I have tblItemList in my SQL DB. I want to display all the data in my tblItemList in GridView control.... How Can I Do That in VB Script using VB.Net......
11
by: dba | last post by:
Have been displaying data from database using html for some time but just recently trying to display data back to "form". Can't find answer. <form method="post" action="<?php echo $PHP_SELF;?>">...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.