I have a repeater that displays an alphabetized list.
When the first letter changes, I want to add something like
<br /> <b>[LETTER]</b> <br />
thus:
A
aword
anotherword
anothernotherword
B
bent
bendover
...
I was thinking of some type of OnItemCreated event handler:
But I can't quite get this working.
I was looking at - but that's too complex of a solution for this.
Suggestions?
When the first letter changes, I want to add something like
<br /> <b>[LETTER]</b> <br />
thus:
A
aword
anotherword
anothernotherword
B
bent
bendover
...
I was thinking of some type of OnItemCreated event handler:
Code:
protected void Repeater1_ItemCreated(object source, RepeaterItemEventArgs e)
{
firstLetter = e.Item.DataItem.ToString().Substring(0, 1);
//Response.Write("Letter: " + firstLetter + "<br>");
}
But I can't quite get this working.
I was looking at - but that's too complex of a solution for this.
Suggestions?