Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   XML DataBinding to the Repeater Control; (http://www.velocityreviews.com/forums/t75255-xml-databinding-to-the-repeater-control.html)

=?Utf-8?B?THVkbWFs?= 04-05-2004 04:21 PM

XML DataBinding to the Repeater Control;
 
hi

I have a xml file and I want to bind it to a nested repeaters. but the problem I'm having is now I cannot give reference to xml nodes inside the repeater.. pls advice me ..
the problem is in line 17. It's not able to render the CountrName from the tblCoutry xml node..
any idea's..?????

HTML with line numbers
---------------------------------
01) <%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="hdb_vb.WebForm1"%>
02) <%@ Import Namespace="System.Xml" %>
03) <HTML>
04) <body>
05) <form runat="server" ID="Form1">
06) <h2>Hierarchical databinding test with XmlNode</h2>
07) <asp:Repeater id="_rep1" runat="server">
08) <itemTemplate>
09) AAA:<%# (Ctype(Container.DataItem, System.Xml.XmlNode)).Attributes("WorldRegionName") .Value %><br>
10) <asp:Repeater runat="server" DataSource='<%# Container.DataItem %>' ID="Repeater1">
11) <itemTemplate>
12) &nbsp;&nbsp;Author:
13) <%# (Ctype(Container.DataItem, System.Xml.XmlNode)).Attributes("CountryName").Val ue %>
14) <br />
15) <asp:Repeater runat="server" DataSource='<%# Container.DataItem %>' ID="Repeater2">
16) <itemTemplate>
17) &nbsp;&nbsp;&nbsp;&nbsp;<i><a href='<%# (Ctype(Container.DataItem, System.Xml.XmlNode)).Attributes("CountryName").Val ue %>'><%# (Ctype(Container.DataItem, System.Xml.XmlNode)).Attributes("CountryMajorCityN ame").Value %></a></i><br />
18) </itemTemplate>
19) </asp:Repeater>
20) </itemTemplate>
21) </asp:Repeater>
22) <hr />
23) </itemTemplate>
24) </asp:Repeater>
25) </form>
26) </body>
27)</HTML>
FINISH



All times are GMT. The time now is 04:48 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.