By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,558 Members | 1,673 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,558 IT Pros & Developers. It's quick & easy.

Editing static text in ItemTemplate at runtime

P: n/a
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?

Thanks for the help anyone can provide.

- Andre
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Could you move the "," into a <SeparataorTemplate>?

I would post ASP.NET related questions to
microsoft.public.dotnet.framework.aspnet for a better response.

Greg

"Andre Viens" <An********@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
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?

Thanks for the help anyone can provide.

- Andre

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.