J
Johnboy
Hi,
I'm creating a website that will have a page that lists current news
items. The news items will be stored in a SQL Server database and will
have basically two fields, the date and the news blurb . . . On the
main page of the site, I want to have a box that shows "Current News"
and only pulls the first 7 or so words from the news blurb followed by
a ... [more] where [more] is a link to the current news page.
For example, the database entry may be something like this:
5/12/05
Chicken Little reports sky is falling. Earlier today Mr. Little was
struck in the head by an unidentified object and immediately announced
the sky was falling.
So on the main page of the of the site it would say:
Current 5/12/05 Chicken Little reports sky is falling. Earlier ... [more]
Is there some sort of Trim function in ASP that I could use to count
the number of spaces in an article and if Less than 7 print the whole
thing, or if more than 7 trim all characters after the 7th space?
Any info would be greatly appreciated.
Thanks!
John
I'm creating a website that will have a page that lists current news
items. The news items will be stored in a SQL Server database and will
have basically two fields, the date and the news blurb . . . On the
main page of the site, I want to have a box that shows "Current News"
and only pulls the first 7 or so words from the news blurb followed by
a ... [more] where [more] is a link to the current news page.
For example, the database entry may be something like this:
5/12/05
Chicken Little reports sky is falling. Earlier today Mr. Little was
struck in the head by an unidentified object and immediately announced
the sky was falling.
So on the main page of the of the site it would say:
Current 5/12/05 Chicken Little reports sky is falling. Earlier ... [more]
Is there some sort of Trim function in ASP that I could use to count
the number of spaces in an article and if Less than 7 print the whole
thing, or if more than 7 trim all characters after the 7th space?
Any info would be greatly appreciated.
Thanks!
John