Highlighting Search Keywords in a DataGrid Web Control
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngdatagridrepeaterdatalist' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Scott Mitchell (VIP)
In many of the popular search engines (such as Google), when you perform a
search the resulting page displays a short text snippet from each search
"hit" with each of those search words you had specified in bold type face.
Similarly, if you view Google's cached version of a search hit, the word(s)
you searched on are highlighted different colors to make them easy to pick
out. This article examines how to provide such functionality in ASP.NET when
using a DataGrid Web control. A DataGrid is an excellent Web control to list
search results. Essentially you provide a TextBox Web control into which a
user can enter a search query. When the user submits the form, it's posted
back and the database is queried for matching records. These returned
results can then be databound to the DataGrid, which will show one result
per HTML table row. (For more information on the DataGrid Web control be
sure to read A Thorough Examination of the DataGrid Web Control article
series.) This article looks at how to then highlight the particular search
terms in the DataGrid results!
[Read More] | [Visit ASPNET.4GuysFromRolla.com]

Scott Mitchell
Click here to reveal e-mail address
http://www.4GuysFromRolla.com/
http://www.ASPMessageboard.com/
http://www.ASPFAQs.com/

* When you think ASP, think 4GuysFromRolla.com!
Reply to this message...
 
    
DavidW
Sorry - got a page not found message!

--
David Wier
http://aspexpress.com
Home of ASP Express - the best ASP text editor in the Galaxy
First editor with ASP.Net features
"Scott Mitchell" <Click here to reveal e-mail address> wrote in message news:687876@aspngdatagridrepeaterdatalist...
In many of the popular search engines (such as Google), when you perform a search the resulting page displays a short text snippet from each search "hit" with each of those search words you had specified in bold type face. Similarly, if you view Google's cached version of a search hit, the word(s) you searched on are highlighted different colors to make them easy to pick out. This article examines how to provide such functionality in ASP.NET when using a DataGrid Web control. A DataGrid is an excellent Web control to list search results. Essentially you provide a TextBox Web control into which a user can enter a search query. When the user submits the form, it's posted back and the database is queried for matching records. These returned results can then be databound to the DataGrid, which will show one result per HTML table row. (For more information on the DataGrid Web control be sure to read A Thorough Examination of the DataGrid Web Control article series.) This article looks at how to then highlight the particular search terms in the DataGrid results!
[Read More] | [Visit ASPNET.4GuysFromRolla.com]

Scott Mitchell
Click here to reveal e-mail address
http://www.4GuysFromRolla.com/
http://www.ASPMessageboard.com/
http://www.ASPFAQs.com/

* When you think ASP, think 4GuysFromRolla.com!
Reply to this message...
 
 
System.Web.UI.MobileControls.TextBox
System.Web.UI.WebControls.DataGrid
System.Web.UI.WebControls.TextBox
System.Windows.Forms.DataGrid
System.Windows.Forms.TextBox




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com