Highlighting Certain words in a document

Discussion in 'ASP .Net' started by Stephajn Craig, Jul 3, 2003.

  1. Is there a way that I can have a page do some highlighting based on a set of
    given keywords?

    The scenario is that a user does a search for certain keywords, and then the
    items returned have the words that cause them to be a match highlighted as
    the user looks through the item.

    --
    Stephajn Craig
    Stephajn Craig, Jul 3, 2003
    #1
    1. Advertising

  2. Stephajn Craig

    David Waz... Guest

    Yep, you can use filters on the output...

    I've never done it - (of course) :)
    but i remember reading that you can place a filter on
    outgoing documents. you could then do string replacement
    on the output stream.

    >-----Original Message-----
    >Is there a way that I can have a page do some

    highlighting based on a set of
    >given keywords?
    >
    >The scenario is that a user does a search for certain

    keywords, and then the
    >items returned have the words that cause them to be a

    match highlighted as
    >the user looks through the item.
    >
    >--
    >Stephajn Craig
    >
    >
    >.
    >
    David Waz..., Jul 3, 2003
    #2
    1. Advertising

  3. Stephajn Craig

    clintonG Guest

    Actually, given the ability to parse the response a CSS declaration
    such as a span including a class that defined a background color
    would meet the requirement...

    <span class="TextHighlight">the words</span>

    --
    <%= Clinton Gallagher
    A/E/C Consulting, Web Design, e-Commerce Software Development
    Wauwatosa, Milwaukee County, Wisconsin USA
    NET
    URL http://www.metromilwaukee.com/clintongallagher/

    LaGarde StoreFront 5 Affiliate: e-Commerce Software Development
    SEE: http://www.storefront.net/default.asp?REFERER=-201499070







    "John Timney (Microsoft MVP)" <> wrote in message news:...
    > You could always just surrounding the words on output with html tags
    > containing the word <strong>the words<strong/>, uisng a regular expression
    > replace, or string replace
    >
    > --
    > Regards
    >
    > John Timney (Microsoft ASP.NET MVP)
    > ----------------------------------------------
    > <shameless_author_plug>
    > Professional .NET for Java Developers with C#
    > ISBN:1-861007-91-4
    > Professional Windows Forms
    > ISBN: 1861005547
    > Professional JSP 2nd Edition
    > ISBN: 1861004958
    > Professional JSP
    > ISBN: 1861003625
    > Beginning JSP Web Development
    > ISBN: 1861002092
    > </shameless_author_plug>
    > ----------------------------------------------
    >
    > "Stephajn Craig" <> wrote in message
    > news:#...
    > > Is there a way that I can have a page do some highlighting based on a set

    > of
    > > given keywords?
    > >
    > > The scenario is that a user does a search for certain keywords, and then

    > the
    > > items returned have the words that cause them to be a match highlighted as
    > > the user looks through the item.
    > >
    > > --
    > > Stephajn Craig
    > >
    > >

    >
    >
    clintonG, Jul 5, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Strøiman
    Replies:
    1
    Views:
    2,057
    Peter Strøiman
    Aug 23, 2005
  2. Richard Heathfield
    Replies:
    7
    Views:
    342
    Barry Schwarz
    Oct 5, 2003
  3. utab

    Words Words

    utab, Feb 16, 2006, in forum: C++
    Replies:
    6
    Views:
    407
    Daniel T.
    Feb 16, 2006
  4. BerlinBrown
    Replies:
    6
    Views:
    4,401
  5. Lasse Edsvik

    replace words with bold words

    Lasse Edsvik, Oct 5, 2003, in forum: ASP General
    Replies:
    9
    Views:
    225
Loading...

Share This Page