Jump to content

Trying to work out how to trim content correctly


prichardson

Recommended Posts

HelloI Have a recordset that gets the content from the database, but I only want to display a certain number of characters on the page.I can do this, but my problem is when it cuts a word in half!! Can I adapt this code to say if it is not a space then add (+1) the number until equals space? Or if anyone can offer a different line that would do the trick?

strReviewContent = Left(strReviewContent,100)

I tried using if statement with these functions but no luck!http://www.w3schools.com/vbscript/func_space.asphttp://www.w3schools.com/vbscript/func_len.aspMany Thanks

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...