Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Highlithing words + asp

Reply
Thread Tools

Highlithing words + asp

 
 
Paulo
Guest
Posts: n/a
 
      09-02-2009
On the classic asp how can I return the words highlited on a search field
with the tag below:
<span style="background-color:#FFFF00">KeyWord returned</span>

So if I search a bookStore with the keyword, example: asp
"Select Title from books where title like '%asp%' "

if returns me:

"Learn asp in 10 days", will just highlited on screen: "Learn <asp> in 10
days"
"Creating components in asp", will just highlited on screen: "Creating
components in <asp>"

How to do it in classic asp?


 
Reply With Quote
 
 
 
 
Bob Barrows
Guest
Posts: n/a
 
      09-02-2009
Paulo wrote:
> On the classic asp how can I return the words highlited on a search
> field with the tag below:
> <span style="background-color:#FFFF00">KeyWord returned</span>
>
> So if I search a bookStore with the keyword, example: asp
> "Select Title from books where title like '%asp%' "
>
> if returns me:
>
> "Learn asp in 10 days", will just highlited on screen: "Learn <asp>
> in 10 days"
> "Creating components in asp", will just highlited on screen: "Creating
> components in <asp>"
>
> How to do it in classic asp?


Use the Replace function:
hiliteprefix="<span style=""background-color:#FFFF00"">"
hitlitesuffix="</span>"
srchword="asp"
srchResult=<one of the results of the search>
srchResult=Replace(srchResult,srchword, _
hiliteprefix & srchword & hitlitesuffix)

Response.Write srchResult
--
HTH,
Bob Barrows


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Words and non-words, according to Microsoft et al Steve B NZ Computing 11 03-21-2008 11:52 PM
Replace stop words (remove words from a string) BerlinBrown Python 6 01-17-2008 02:37 PM
Words Words utab C++ 6 02-16-2006 07:00 PM
Non-noise words are incorrectly recognised as noise words. Peter Strĝiman ASP .Net 1 08-23-2005 01:26 PM
Re: A little bit of help regarding my linked list program required. - "words.c" - "words.c" Richard Heathfield C Programming 7 10-05-2003 02:38 PM



Advertisments