I have a web form with a Repeater which returns an alphabetically sorted list of names. Whenever the first letter of the name changes (ie from A to B or B to C) I want to display a blank line in the repeater to make it easier to read this list of 100+ names.
I have the if statement which catches the change correctly. I just don't know what code to type to get the blank line.
I tried response.write("<tr><td><b
r /></td></tr>"), but this inserted blank lines at the top of the form instead of inside the repeater table.
What is the correct way to do this?
If e.Item.ItemType = ListItemType.AlternatingItem Or e.Item.ItemType = ListItemType.Item Then
If (Left(e.Item.DataItem("CoName"), 1)) <> prevChar And String.IsNullOrEmpty(e.Item.DataItem("CoName")) = False Then
' want a break line here
prevChar = Left(e.Item.DataItem("CoName"), 1)