473,513 Members | 2,339 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Nov 18 '05 #1
0 1030

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
5385
by: Ed Allan | last post by:
http://ejaconsulting.com/nestedrepeater/NestedRepeater.txt >-----Original Message----- >Doh! The HTML has all been rendered . . . > >Right click on this link and select 'Save target as ..' >to...
4
1290
by: Jason S | last post by:
I haven't been able to find a clear answer to this and I'm hoping someone could enlighten me. As pertains to databinding a control in a repeating fashion(datagrid, repeater, etc.) what event...
0
947
by: Ludmal | last post by:
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...
2
2023
by: Andy Fish | last post by:
Hi, First some background: When you databind a repeater control, the controls within the template are given an id like Repeater1:_ctl<n>:Button1 where <n> increments for each repeater item. If...
1
2146
by: Joe Gass | last post by:
I'd like to bind some xml to a dropdownlist <engines> <engine name="test1" id="1" /> <engine name="test2" id="2" /> </engines> If I do: ddlEngines.DataSource =...
8
1823
by: Joey Chömpff | last post by:
L.S., Hello is there a way to implement 2-way databinding without using the datasources from dotnet 2.0. Why would you ask? Now that's simple. I've created an object model with BusinessObjects...
3
2639
by: Charlie | last post by:
Hi: Is it possible to databind an image in Repeater Control? I see support for it in GridView, but not in Repeater control. There is another way to do this, but would rather go with new...
4
3752
by: AC [MVP MCMS] | last post by:
Implementing databinding from the ASPX/ASCX file is very straightforward: <asp:XmlDataSource id="XmlDs1" DataFile="">...</> <asp:Repeater> <HeaderTemplate><%#XPath("title")%></> </> However,...
1
2151
by: philippe sillon | last post by:
I have a stupid problem but not able to find solution :( I have repeater that create user control (WebUserControl1) . I pass parameter (InterationString) to user control that is...
0
1872
by: Dave A | last post by:
I have a user control that is dynamically loaded into a repeater; (so the user control appears several times) The user control features a text box and a delete button. When the delete button...
0
7175
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7553
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7120
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7542
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4754
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3247
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1609
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.