Lisa wrote:
Hi. I have an ASP app that allows administrators to add articles to a
database for viewing by the public. What I want to do is display a summary
of the article and give the user the visitor to the website the option to
click "more..." to view all of the article.
Can anyone give me some tips or possibly point me to code that would help me
achieve this? Any help would be greatly appreciated.
1. Provide an additional input in the "add_articles" page so that
administrators can submit an abstract. Store that in a separate field
in the db and display only the abstract on the page to start with...
2. Use the Left() function to pick up the first 100/200/500 or whatever
characters followed by <a href="somelink">...more</a>
3. Use the split function to pick up the first x number of words...
<%
summary = split(article," ")
For i = 0 To 100 'number of words
Response.Write summary(i) & " "
Next
Option 1 is the one I use. That way, the contents of the summary are
under the contol of the admin/editor.
--
Mike Brind