Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi ;)

 

 

I have a ReadOnly Multiline TextBox that has DataBound Text and i wat it to have a limit of characters at runtime

 

and i just cant get it to have maximum value for the characters that i specify

 

Can anyone Help please

Posted

the concept its something like this

 

 

I have a text :

 

"See Forum Rules (below) for

more information about what

codes you are allowed to use

in your posts."

 

thats the Text from the database

 

now at runtime i want it to be like this :

 

 

"See Forum Rules (below) for

more information about what

codes..."

 

im shure that must be way to manage that

 

 

Thanks

  • *Gurus*
Posted

And if that doesn't work create a function to handle it:

 

Public Function TruncateText(ByVal text As String, ByVal maximumLength As Integer) As String
    If text.Length > maximumLength Then
         Return text.Substring(0, maximumLength) & "..."
    Else
         Return text
    End If
End Function

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...