We help IT Professionals succeed at work.
Get Started

How can I display only part of data in the repeater control column?

Last Modified: 2012-05-11
I have repeater control which I am binding directly to my datatable, to display data in column.
ASPX page
<asp:Repeater ID="Repeater1" runat="server">
      <%# DataBinder.Eval(Container.DataItem, "NAME")%>
      <%# DataBinder.Eval(Container.DataItem, "DESCRIPTION")%>
      <%# DataBinder.Eval(Container.DataItem, "NAME")%>
      <%# DataBinder.Eval(Container.DataItem, "DESCRIPTION")%>
ASPX.VB page
If ds.Tables(0).Rows.Count > 0 Then
      Repeater1.DataSource = ds
            End If
In DESCRIPTION the data is really long. Ex:'1-1-1-this is example-123456-d-d.................'.
I do not want to display all of it.
Is there a way I can display only "this is example-123456" when I bind the column to the repeater?
Watch Question
Most Valuable Expert 2012
Top Expert 2014
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE