search result highlight

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yogarajan
    New Member
    • Apr 2007
    • 115

    search result highlight

    Dear Friends

    i am devloping for search box it is woking good i want highlight my search text. My original text is Mixed case (Lower case and upper case) my search text is lower case means how can i highlight
    it is possible? pls guide me

    Example
    Content : "The previous installments in this article series have demonstrated how to display, group, sort, and page through data using the ListView control. In addition to displaying data, the ListView control also provides support for inserting, updating, and deleting data. If the ListView uses a data source control (such as a SqlDataSource or ObjectDataSourc e) and that data source control is configured to support insert, updating, or deleting, then implementing such functionality in the ListView does not require writing a single line of code. Rather, adding inserting and updating support entails creating templates that define the inserting and updating user interfaces and Button controls that trigger the actual update or insert. Implementing deleting support requires simply adding a properly"

    Keyword : Listview , or ListView or LISTVIEW ............... etc

    output : The previous installments in this article series have demonstrated how to display, group, sort, and page through data using the ListView control. In addition to displaying data, the ListView control also provides support for inserting, updating, and deleting data. If the ListView uses a data source control (such as a SqlDataSource or ObjectDataSourc e) and that data source control is configured to support insert, updating, or deleting, then implementing such functionality in the ListView does not require writing a single line of code. Rather, adding inserting and updating support entails creating templates that define the inserting and updating user interfaces and Button controls that trigger the actual update or insert. Implementing deleting support requires simply adding a properly
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Now that you've stated what you want to achieve...could you please tell us what you're having problems with?

    What have you tried to so far to solve the problem?
    What are you having problems with?
    Are there any errors that you're encountering? What are they?

    -Frinny

    Comment

    • ryachza
      New Member
      • Jun 2009
      • 7

      #3
      My initial thought is to use regular expressions ignoring case to find and replace the keyword.

      Second would be to convert the resulting text to lower, loop on IndexOf to find all character locations of the keyword, and use those locations in the mixed-case string with the length of the keyword.

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        I prefer Regular expressions :) but both solutions will work.

        Comment

        Working...