Questions tagged [asprepeater]

Use it for displaying a repeated list of items that creates a connection between data source and user interface.

A Repeater has five templates to format it from data source:

  • HeaderTemplate --> Displays header text and applies different styles.
  • AlternatingTemplates --> Changes the style if items are changing on data binding.
  • ItemTemplate --> Displays items when it's not in header of footer mode.
  • SeparatorTemplate --> It separates items using <br> tags.
  • FooterTemplate --> Displays footer text and applies different formatting.
207 questions
10
votes
1 answer

What is the easiest way to put an index to a repeater control in .NET?

I want an ASP:NET WebForms Repeater control to put an index next to each of its output rows automatically. How can I do that? Example: Name 1 John 2 Jack 3 Joe
Barış Velioğlu
  • 5,243
  • 14
  • 54
  • 97
7
votes
2 answers

Maintaining viewstate of a repeater

I have a problem whereby the viewstate of a repeater i.e. the controls within the repeater are not maintaing their viewstate. I have the following: Repeater 1:
higgsy
  • 1,961
  • 8
  • 29
  • 45
5
votes
1 answer

How to fire event of textbox with OnItemCommand of a repeater , without using LinkButton?

I have a repeater with a textbox inside , and I want to fire an event when I move from one textbox to another textbox , with the OnItemCommand of the repeater .
JAN
  • 18,509
  • 49
  • 147
  • 268
5
votes
4 answers
4
votes
3 answers

Repeater error - server tag is not well formed

I'm using a repeater to display data records on my page. It used to be that I'd use tables inside it and I never had a problem, but now I'm using divs and I keep getting build errors saying the server tag is not well formed... Can anyone see…
Ortund
  • 7,259
  • 17
  • 59
  • 125
4
votes
1 answer

Sort Inner Repeater with LINQ query

I am attempting to list a group of Associations, within each association is a 'widget' that is assigned to the association. The list will include the Association name and any widget assigned to it. The catch is that the inner widget list needs to…
Jon Harding
  • 4,782
  • 12
  • 46
  • 88
4
votes
1 answer

c# asp.net repeater - create button based on condition

Basically what i would like to do is have a button which is only created for entries that have been flagged in a separate table for sending. So for example if i edit a record, i flag this other table and would like a send button to appear next to…
JazziJeff
  • 691
  • 4
  • 15
  • 35
3
votes
1 answer

Kentico CMS Repeater UniPager shows everything on one page

I have the following code in front: //code
rory
  • 1,608
  • 3
  • 17
  • 41
3
votes
1 answer

How to access specific controls in a ASP.Net Repeater

Introduction I am working on a college project where I need to build a shopping website. I am currently building a "Manage Shopping Cart" page with the following structure: What is important for my question is the "products". The "products" is a…
Tyler
  • 809
  • 9
  • 23
3
votes
1 answer

Inline IF statement for ItemIndex asp:Repeater VB.NET

I am trying to do an inline IF statement inside a asp:Repeater control to add a class to the first item, but I can't quite seem to figure it out. Basically the code I have right now that is not working but should give an idea of what I'm "trying"…
jaywon
  • 7,818
  • 10
  • 36
  • 47
3
votes
3 answers

asp repeater button text change

Good day, I want the text of the button inside the repeater to change dynamically based on what the sql selected values would have. here's my code: asp.cs if (!IsPostBack) { string getEmp = "Select employeeid, photo, lastname, firstname,…
3
votes
4 answers

Set CheckBox "Checked" propery in ASP repeater

I was wondering if it's possible to set the checked propery of a checkbox, using a bool variable form the repeater's datasource? I've tried several ways but without any success...:
Anton Belev
  • 7,909
  • 18
  • 59
  • 103
2
votes
1 answer

Asp.net repeater control data duplicated when use multiple times binding

I am using asp.net 2008 repeater control. I am trying to refresh the repeater control when a button is clicked, it shows me duplicated values, that means its appending the same values once again. Here is my code public void LoadRepeater1() { …
AjayR
  • 4,059
  • 4
  • 40
  • 74
2
votes
2 answers

How to use data bound value to form unique identifier for item control?

I know that we can bind the data to each control within ItemTemplate as follow: However, I found no way to concatenate a string prefix with…
William Choi
  • 5,471
  • 6
  • 29
  • 48
2
votes
0 answers

Repeater Container.DataItem vs Item

I'm working on a project that uses Container.DataItem in ascx files inside of repeaters a lot. Is there a difference between using Container.DataItem and casting it vs Item if the ItemType declared for the repeater?
Teeknow
  • 1,015
  • 2
  • 16
  • 36
1
2 3
13 14