G
Guest
Hello,
I have a repeater control I am using to display items that are comma
separated. The code looks like this:
<asp:Repeater id="rptSummary" runat="server">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem,
Container.DataItem.Row.Table.Columns(0).ColumnName)%>,
</ItemTemplate>
</asp:Repeater>
The code works exactly as it should. However, for the last item, I would
like to remove the comma at the end of it, since obviously there is no
additional items. This is where I'm getting stuck...
How can I reference my ItemTemplate from code to remove the trailing comma?
It has been suggested to use a SeparatorTemplate to do this, but I still do
not see how to reference the final SeparatorTemplateItem after it is bound to
the data.
Thanks for the help anyone can provide.
- Andre
I have a repeater control I am using to display items that are comma
separated. The code looks like this:
<asp:Repeater id="rptSummary" runat="server">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem,
Container.DataItem.Row.Table.Columns(0).ColumnName)%>,
</ItemTemplate>
</asp:Repeater>
The code works exactly as it should. However, for the last item, I would
like to remove the comma at the end of it, since obviously there is no
additional items. This is where I'm getting stuck...
How can I reference my ItemTemplate from code to remove the trailing comma?
It has been suggested to use a SeparatorTemplate to do this, but I still do
not see how to reference the final SeparatorTemplateItem after it is bound to
the data.
Thanks for the help anyone can provide.
- Andre