Questions tagged [repeater]

The Repeater control is used to display a repeated list of items that are bound to the control.

The ASP.NET Repeater is a basic container control that allows you to create custom lists from any data available to the page. It's a handy control, especially since most ASP.NET pages that display data need to repeat the same kinds of data over and over.

2759 questions
402
votes
8 answers

What is the correct syntax of ng-include?

I’m trying to include an HTML snippet inside of an ng-repeat, but I can’t get the include to work. It seems the current syntax of ng-include is different than what it was previously: I see many examples using
Jakob Jingleheimer
  • 29,050
  • 22
  • 73
  • 121
120
votes
8 answers

How to find controls in a repeater header or footer

I was wondering how one would find the controls in the HeaderTemplate or FooterTemplate of an Asp.Net Repeater control. I can access them on the ItemDataBound event, but I was wondering how to get them after (for example to retrieve a value of an…
mbillard
  • 36,360
  • 18
  • 71
  • 97
103
votes
7 answers

ASP.NET Repeater bind List

I am binding a List to a Repeater control. Now I want to use the Eval function to display the contents in ItemTemplate like <%# Eval("NAME") %>. But I am not sure what I should use instead of NAME.
josephj1989
  • 8,761
  • 9
  • 45
  • 67
80
votes
2 answers

ASP.net Repeater get current index, pointer, or counter

the question is really simple. Is there a way to access the current pointer/counter for an asp Repeater control. I have a list with items and I would like one of the repeaters columns (it repeats and html table) to be something like ... Item 1 |…
Jan W.
  • 1,701
  • 5
  • 26
  • 28
56
votes
8 answers

ASP.NET repeater alternate row highlighting without full blown

I'm trying to accomplish simply adding a css class to a div on alternate rows in my without going to the overhead of including a full blown which will force me to keep a lot of markup in sync in the…
Kieran Benton
  • 8,177
  • 11
  • 50
  • 74
51
votes
8 answers

Default text for empty Repeater control

Using VS 2008, I have a Repeater control:
AGuyCalledGerald
  • 7,117
  • 16
  • 63
  • 110
44
votes
7 answers

Repeater in Repeater

I have a repeater inside a repeater. Where the parent repeater is bound to a Datatble which has a column with a Datatable in it. I would like to bind the child repeater to the datatable column in the parent repeater's datarow Is this possible? i was…
bill
  • 915
  • 5
  • 10
  • 21
42
votes
4 answers

Nested Repeaters in ASP.NET

I have a class that contains hierarchical data. I want to present this data in my ASP.net webapp using nested repeaters. How do I do this? I've only ever done one level of nesting, how do I do say five levels? Each item can have zero or many sub…
Mike
  • 433
  • 1
  • 4
  • 7
41
votes
4 answers

Bind dictionary to repeater

I have a dictionary object and would like to bind it to a repeater. However, I'm not sure what to put in the aspx markup to actually display the key-value pair. There are no errors thrown and I can get it to work with a List. How do…
XSL
  • 2,795
  • 7
  • 33
  • 58
36
votes
4 answers

Binding a generic list to a repeater - ASP.NET

I am trying to bind a List to a repeater. I have converted the list into an array by using the ToArray() method and now have a array of AreaField[] Here's my class hierarchy public class AreaFields { public List Fields { set;…
DotnetDude
  • 11,119
  • 30
  • 94
  • 156
36
votes
4 answers

Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control

I am getting the following error Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control. but all I am trying to do is inside a ASP.NET REPEATER Control <% if ( Eval("Message").ToString() ==…
Dan
  • 363
  • 1
  • 3
  • 4
33
votes
4 answers

How can I loop through Items in the Item Template from an asp:Repeater?

I have a repeater, which is bound on preRender with items. In the Item template each row has a check box. This works fine. I'm trying to loop through all the checkboxes in the item template after it has been bound. Is there any way of doing this?
Funky
  • 11,511
  • 32
  • 93
  • 157
31
votes
7 answers

Strange Error - CS0012: The type x is defined in an assembly that is not referenced

The type 'x' is defined in an assembly that is not referenced. You must add a reference to assembly 'abc123'. I have a .NET 2.0 web application that references my assembly 'abc123'. The assembly exists in the GAC and I've verified that it is the…
Mike T
  • 365
  • 2
  • 4
  • 9
30
votes
10 answers

Formatting DataBinder.Eval data

How can I format data coming from a DataBinder.Eval statement in an ASPX page? For example, I want to display the published date of the news items in a particular format in the homepage. I'm using the ASP.NET 2.0 Repeater control to show the list of…
Nahom Tijnam
  • 4,372
  • 5
  • 23
  • 25
30
votes
10 answers

asp.net radio button grouping

I am currently having an issue with radio buttons and grouping. I have an asp radio button within a repeater control. I have the group name attribute set to "Customer". When the page loads, the radio buttons are not grouped. Instead of the id fields…
fizch
  • 2,539
  • 3
  • 26
  • 42
1
2 3
99 100