限制datalist内显示字数

来源:互联网 发布:excel编程入门 编辑:程序博客网 时间:2024/05/22 16:52

   '限制datalist内显示字数
    Public Property substring(ByVal str As String) As String
        Get
            If str.Length > 13 Then
                str = str.ToString().Substring(0, 13) + "..."
            End If
            Return str
        End Get
        Set(ByVal Value As String)

        End Set
    End Property
'前台绑定的数据
Text='<%# substring(Eval("filename").ToString())%>'

原创粉丝点击