G
Guest
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) Author:
13) <%# (Ctype(Container.DataItem, System.Xml.XmlNode)).Attributes("CountryName").Value %>
14) <br />
15) <asp:Repeater runat="server" DataSource='<%# Container.DataItem %>' ID="Repeater2">
16) <itemTemplate>
17) <i><a href='<%# (Ctype(Container.DataItem, System.Xml.XmlNode)).Attributes("CountryName").Value %>'><%# (Ctype(Container.DataItem, System.Xml.XmlNode)).Attributes("CountryMajorCityName").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
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) Author:
13) <%# (Ctype(Container.DataItem, System.Xml.XmlNode)).Attributes("CountryName").Value %>
14) <br />
15) <asp:Repeater runat="server" DataSource='<%# Container.DataItem %>' ID="Repeater2">
16) <itemTemplate>
17) <i><a href='<%# (Ctype(Container.DataItem, System.Xml.XmlNode)).Attributes("CountryName").Value %>'><%# (Ctype(Container.DataItem, System.Xml.XmlNode)).Attributes("CountryMajorCityName").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