layout question

  • Thread starter Thread starter Howard
  • Start date Start date
H

Howard

some times there are very long urls in my page content that is pulled from a
database, it will mess up the page layout since there's no break or space in
the long word. Is there a way in html or css to fix this problem? or do i
have to write a script that finds all words in my string that are longer
than 50 characters and truncate them?

Howard
 
Mr Howard you can write a function like below and make use of Substring:-
Protected Function CheckLength(ByVal Name As String) As String
If ProductName.ToString().Length > 18 Then
Return ProductName.Substring(0, 18) & "..."
Else
Return ProductName.ToString()
End If

End Function

Hope that helps
Patrick
 
Are you displaying a URL link on your web page with the full URL as the link
text?

If so, one solution is to set up your database so that you have a URL and a
DESCRIPTION field. Make the description a reasonable length and make it
required. When the user enters a new URL they will have to put in a
reasonable description that will be displayed.
 
Back
Top