Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML Nodes and Repeaters

Status
Not open for further replies.

jermine

Programmer
Jun 15, 2001
59
SG
Hello there!

Im having trouble displaying the values of an xml output in a repeater.

i hope you .NET gurus can help me on this.
the xml output :
Code:
 <?xml version="1.0" encoding="utf-8" ?> 
- <response>
- <person>
  <fname>harry</fname> 
  <lname>potter</lname> 
  <bday>07-31</bday> 
  </person>
  </response>

here set the root nodes to read data from :
Code:
System.Xml.XmlNodeList result = xmldoc.SelectNodes("/response/person");

then i bind the XmlNodeList result with my repeater.
In order to display the values in the repeater for each node , the place this code in my aspx
Code:
<%# (System.Xml.XmlNode)(Container.DataItem).SelectSingleNode("fname").Value %>

but the item are not displayed.

in which part of the code am i wrong?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top