我有一个绑定到工作日的数据列表项.我把逗号放在网格视图中如何仅删除最后一个逗号... [英] I have a datalist item i bind the week days. i put the comma in grid view in how to remove last comma only...
本文介绍了我有一个绑定到工作日的数据列表项.我把逗号放在网格视图中如何仅删除最后一个逗号...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个绑定到工作日的数据列表项.我将逗号放在网格视图中,了解如何仅删除最后一个逗号...
我这样写
I have a datalist item i bind the week days. i put the comma in grid view in how to remove last comma only...
i write like this
<asp:DataList ID="dlstWeekDays" runat="server" RepeatColumns="7" RepeatDirection="Horizontal" ;
<ItemStyle Width="50px" Font-Size="12px" />
<ItemTemplate> <%#Eval("Lookup.Code")%>,
</ItemTemplate>
</asp:DataList>
我像这样被放下
工作日:
星期一,星期二,星期三,星期四,星期五,
我只想删除星期五"之后的内容,而不要删除星期五"之后的内容,
i get out put like this
Working days :
Monday, Tuesday, Wednesday, Thursday, Friday,
i want remove after "Friday" only not this "Friday,"
推荐答案
<%#Eval("Lookup.Code.TrimEnd(',')")%>,
这篇关于我有一个绑定到工作日的数据列表项.我把逗号放在网格视图中如何仅删除最后一个逗号...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文