473,503 Members | 2,150 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

repeater problem

Hello,
I want to set a unique id for each item in a repeater like this:

<asp:repeater id=__theTabStrip runat="server" DataSource='<%#
DataBinder.Eval(Container,"TabText") %>'>
<ItemTemplate>
<asp:Button Runat="server" id="<%# Container.DataItem %>" BackColor="<%#
SetTabBackColor(Container) %>" />
</ItemTemplate>
</asp:repeater>

However, the id="<%# Container.DataItem %>" generates an error:'<%#
Container.DataItem %>' is not a valid identifier.

Would someone please tell me what I did wrong?

--
help, help
Jul 22 '05 #1
2 1322
CJM

"rouqiu" <ro****@discussions.microsoft.com> wrote in message
news:B4**********************************@microsof t.com...

Would someone please tell me what I did wrong?


You posted to the *classic* ASP group rather than a dotNET one.
Jul 22 '05 #2
rouqiu wrote:
Hello,
I want to set a unique id for each item in a repeater like this:

<asp:repeater id=__theTabStrip runat="server" DataSource='<%#
DataBinder.Eval(Container,"TabText") %>'>
<ItemTemplate>
<asp:Button Runat="server" id="<%# Container.DataItem %>" BackColor="<%#
SetTabBackColor(Container) %>" />
</ItemTemplate>
</asp:repeater>

However, the id="<%# Container.DataItem %>" generates an error:'<%#
Container.DataItem %>' is not a valid identifier.

Would someone please tell me what I did wrong?


You may want to repost this one to a .NET (DotNet) group. This group is
for the "classic" ASP stuff, not many .NET people here.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
Jul 22 '05 #3

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

Similar topics

0
1745
by: mark | last post by:
My problem is I need to have a "nested" repeater. I have an array which I load into a hashtable - that part works great. I can setup the second repeater to work just fine, as long as it's not...
2
3269
by: Stephen Miller | last post by:
I am using the OnItemDataBound event of Repeater control to nest a DataGrid within the Repeater. When I attempt to bind to the DataGrid using the DataSource method I get the error message "Object...
2
2119
by: Colin Nicholls | last post by:
Platform: ASP.NET 1.1 I have a repeater nested inside another repeater. My outer repeater is looping fine. I am manually binding the inner repeater to a DataReader obtained from another...
8
2893
by: I am Sam | last post by:
Hi everyone, This problem is making me old. I don't want to get any older. I have a multi-nested repeater control as follows: <asp:Repeater ID="clubRep1" Runat="server">...
3
4109
by: Shimon Sim | last post by:
I put linkbutton in a repeater header. I attached event handler in makeup as onclick="btnSort_Click". Made btnSort_Click method public. It doesn't fire if I click on it. I tried to attach it in...
2
1897
by: mark | last post by:
(not sure if this is the correct group) My problem is I need to have a "nested" repeater. I have an array which I load into a hashtable - that part works great. I can setup the second repeater...
0
4083
by: uncensored | last post by:
Hello everyone, I'm fairly new at .Net and I have a repeater inside a repeater problem. I will attach my code to this message but basically what I am able to tell when I run my page it tells me...
7
2991
by: | last post by:
I have what's probably a simple page lifecycle question related to dynamically evaluating values that are placed by a repeater and dynmically placing user controls that use those values. I'm...
1
7118
by: jazzart | last post by:
Hi there, I'm fairly new to programming with Asp.Net 2.0 so I'm finding myself regularly fumbling around in the dark a bit, so to speak. I'm currently using Visual Web Developer and have been...
2
1849
by: Hong | last post by:
Hi, I have been scratching my head over this problem for hours, the repeater control I am using would only render the controls specified in HeaderTemplate and FooterTemplate, but the repeater...
0
7349
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
7008
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
7467
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...
0
5594
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5022
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
3177
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
3168
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
746
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
399
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.