[thelist] ASP: First 100 words in a record

Jay Blanchard jay.blanchard at niicommunications.com
Wed Jun 19 10:39:00 CDT 2002


[snip]
Using ASP, is there a way to limit the number of words returned in a
recordset?

Simple example: I've got a CMS that deals with articles. On the home page, I
want to show the first 100 words or so of every article with a "click here
to read the full text" link afterward.
[/snip

Use a for loop to count (match in VBScript IIRC) the spaces between words
and return the results when the counter reaches 100.

HTH!

Jay








More information about the thelist mailing list