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">
<HeaderTemplate>
<table>
<tr>
<td>NAME</td>
<td>DESCRIPTION</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<%# DataBinder.Eval(Container.DataItem, "NAME")%>
</td>
</tr>
<tr>
<td>
<%# DataBinder.Eval(Container.DataItem, "DESCRIPTION")%>
</td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr>
<td>
<%# DataBinder.Eval(Container.DataItem, "NAME")%>
</td>
</tr>
<tr>
<td>
<%# DataBinder.Eval(Container.DataItem, "DESCRIPTION")%>
</td>
</tr>
</AlternatingItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
----------------------------------
ASPX.VB page
-------------------------------------
If ds.Tables(0).Rows.Count > 0 Then
Repeater1.DataSource = ds
Repeater1.DataBind()
End If
myDS.Dispose()
----------------------------------------
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?
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.