473,387 Members | 1,687 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Editing static text in ItemTemplate at runtime

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
1 1124
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mark Perona | last post by:
I created an ASP.net form with an editable datagrid on it. I can create new records, and update and delete existing records. The problem I have is that I want a field in the grid to be editible...
0
by: Sebi | last post by:
Hello All, I'm having problems, reading the new Values from CheckBox in a DataGrid. my Code Behind is C# I do exactly what other samples do, but I allways get the Initial Values instead of...
4
by: Andre Viens | last post by:
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> <%#...
4
by: Marcos Beccar Varela | GamaCom Argentina | last post by:
Hello Everyone. I need to use a gridview, that when I use the Update command one of the colums, instead of showing a textbox where the user can write, I need a combobox (listobx), where there are...
0
by: Mike P | last post by:
I am trying to edit a gridview while using paging, but whenever I try to edit a row on a page other than page 1, I get an error. Here is my gridview and my code : <asp:GridView ID="GridView1"...
1
by: AmitKu | last post by:
I've got the Gridview going at full speed, and I've enabled editing, but when I click on the "edit" button, this ugly editing UI comes up. Well it's not ugly, but it's not great either. How do I...
1
by: needhelp1 | last post by:
I have gridview with a detailsview below. When I click on 'New' in brings up the DetailsView for inserting. When I click on 'Edit' in does not brink up the DetailsView. What am I doing wrong? I...
0
by: hanusoft | last post by:
This is an example of editing in DataGrid and Default Paging http://www.hanusoftware.com Html Design Code : - <asp:DataGrid id="DataGrid1" DataKeyField="id" runat="server" Height="224px"...
5
by: sandhyascs | last post by:
Hi everyone I’m using the GridView in asp.net and populating the grid dynamically using c#.net.To edit the rows i i m using GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.