473,473 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Highlighting Certain words in a document

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
Nov 17 '05 #1
2 1708
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 ofgiven keywords?

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

--
Stephajn Craig
.

Nov 17 '05 #2
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 cs*********@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/

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



"John Timney (Microsoft MVP)" <xy********@btinternet.com> wrote in message news:eC**************@TK2MSFTNGP12.phx.gbl...
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" <s.*****@NOSPAMfunsunvacations.com> wrote in message
news:#6**************@TK2MSFTNGP10.phx.gbl...
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


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Adelson Anton | last post by:
Hi all, Ok, this is what I want to do: When you press, say Ctrl+K ( it doesn't matter which event), I want the , say, second word in the document to be highlighted. Anyone has any idea how...
1
by: Nic | last post by:
Hi - I am battling to find the a resource, so maybe some one in here can help The problem is as follows: I am trying to build a mod_perl source code editor for the web - to edit Perl source code...
18
by: prasanna.hariharan | last post by:
Hi guys, I want to remove certain words from a c++ string. The list of words are in a file with each word in a new line. I tried using the std::transform, but it dint work. Anybody got a clue...
4
by: Bob hotmail.com> | last post by:
Everyone I have been spending weeks looking on the web for a good tutorial on how to use regular expressions and other methods to satisfy my craving for learning how to do FAST c-style syntax...
0
by: Brian Scott | last post by:
I am currently trying to control the syntax highlighting of a richtextbox control whilst the user types. At the moment I have implemented a thread which calls the richTextBox.Invoke on a method...
0
by: Charlie | last post by:
I have a document that will be displayed in a panel. Words that have a certain attribute will be displayed is a highlight (probably color). The user will have the option to select which attribute...
2
by: rockstar_ | last post by:
Hello all- I'm developing a Content Management software for my own site, and possibly package and deploy to other sites (for friends, family, etc.) The content management software is combined...
7
by: Leif902 | last post by:
After much searching of google, the closest I can find is highlighting search terms... however, this is not what I wanted to do. Does anyone know how to parse through a specific element (lets say...
5
Breezwell
by: Breezwell | last post by:
I have done some searching on this one and I have yet to find any information that sheds light on what I am trying to do. At lease from what I can understand. Basically, I have a main form which...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.