Results 1 to 2 of 2

Thread: description

  1. #1
    Join Date
    Dec 1969

    Default description

    Hi.<BR><BR><BR><BR>Here&#039;s my question. Does anyone has an idea how can I or where can I find the code for:<BR><BR><BR><BR>in DB (access) i have a column named Content. The data type is text (memo because it&#039;s a large). On the first page I want to show only the first 50 letter or the first 20 words just enough for the visitor to see, what the article is about. I he/she wants to read the hole article, he/she clicks the link and he gets the full content of the ceratin record from the column Content.<BR><BR><BR><BR>I&#039;m new to ASP so if you know where is a script I need or something clode enough for me to make my own, please ...<BR><BR><BR><BR>THX<BR>

  2. #2
    Join Date
    Dec 1969

    Default Easy...

    &#060;%<BR>...<BR>&#039; get the full text into a variable<BR>content = RS("content") <BR>&#039; starting at character 50, look backwards for a space<BR>spaceAt = InStrRev( content, " ", 50 )<BR>&#039; if no space found in first 10 characters going backwards...<BR>If spaceAt &#060; 40 Then spaceAt = 50 &#039; ..pretend there is a space at char #50<BR><BR>Response.Write Left( content, spaceat ) & "..." & "&#060;br/&#062;"<BR>...<BR>%&#062;<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts