"子串"一个GridView绑定列对象 [英] "Substring" a GridView BoundField object
本文介绍了"子串"一个GridView绑定列对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
谁能告诉我如何串的GridView绑定列对象吗?
我尝试这个到目前为止并没有奏效。谢谢你。
<&ItemTemplate中GT;
< ASP:标签ID =Label1的=服务器文本='<%#ChopString((串)的eval(说明))%>'>< / ASP:标签>
< / ItemTemplate中>
解决方案
您需要使用子。
评估(说明)。toString()方法。子串(0.60)
我相信这就是你所需要的。
Can anyone tell me how to substring a GridView BoundField object please?
I tried this so far and it hasn't worked. Thank you.
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# ChopString((string)Eval("description")) %>'></asp:Label>
</ItemTemplate>
解决方案
You need to use substring.
Eval("description").ToString().Substring(0,60)
I believe thats all you need.
这篇关于&QUOT;子串&QUOT;一个GridView绑定列对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文