昊仔

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2013年11月24日

摘要: 我在REPEATER控件中显示绑定的数据,但有的字符串长度较长,超出了定义的行宽,如果只想显示字符串的部分内容,如何实现. 代码如下: " target=_blank> 答案一public string GetChar( string str , int len ) { /// if( str.Length > len ) { str = str.Substring( 0, len ); str = str + "..."; return str; } else ... 阅读全文
posted @ 2013-11-24 20:55 昊仔 阅读(414) 评论(0) 推荐(0) 编辑