Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Forum
how to highlight the search word result
April 20, 2010
This question is based on my project: Thesis ManagementSystem..
In my project using VB in ASP .NET, I have a searching function. When the user enter the keyword like "Shift-OR" then i will show all the Thesis ID which is content the shift-or keyword in it.. So, user can click on the ID to go to the other page(ResultPage.aspx) which will display the content of the thesis related to the search keyword.
My problem now is, i don't know how to highlight the keyword in the new page because most of the example that I found at the Internet using gridview.. but in my case, I'm only use the label.
Hopefully to hear from u..
Posted Date: April 20, 2010 Points: 5
If I understood you correctly you can search a keyword from SQL Server and if the result matches than you have to pull the whole records and in that Paragraph you need to highlight the keyword. Is that correct?
If yes than do like this
full text search
functionality of sql server to search the keyword and get the record from database.
Once you get the record from database use
method to find the keyword position in the record.
Once you get the position of the keyword from a record use
to and use <font> tag to
highlight the keyword.
and yes do not use label use asp.net litral control to display paragraph with highlighted text. because using Label control you can not highlight the particular text, word or keyword.
Hope this will help you
Mark As Answer if this solve your problem
Posted Date: August 03, 2010 Points: 5
I suggest to use a .net word component name Spire.Doc, I use it long time, quit good.
May help to you.
To post reply
Related Questions Related Questions
Search any Word from oracle Bfile
In Search, Highlighting the result in a textbox. Vb.net
Search value in DataGridView in C#.NET windows app
How to display Searched Records in Highlight way inside GRIDVIEW ?
Fast search in asp.net
Performing search on MS SQL Server 2008 database
Datatable to word
fill existing microsoft word document from sql table
Search Engine in a website
Filter Inactive DL''s from the LDAP search
Latest Forum Questions From The Same Category
How do i get payment status in redirect page using bitpay?
Login with Facebook and Save details in database
Login with facebook account in my website
How to make a nested datalist control?
What class does Icon derive from?
What are the validation controls?
What''s the difference between an interface and abstract class?
How to read Unicode form PDF File and Save into DataBase ?
How to identify the color format of eps/tiff using c#?
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more
Quick Links For Forum Categories:
Hall of Fame
Terms of Service
Tell A Friend