I have a mobile website that allows you to search on three different criteria and dsiplay the results in a gridview. I thought it would be easy to modify it so that when the results are displayed, the field that was searched would display the sought text string with the colors reversed, as is the style for so many search engines. So I began modifying the rowdatabound() event, searching the relevant field for the search string, sandwiching the search string inside a <FONT> block with the reverse colors wherever it was found, and assigning the result back to the control that the field was bound to.
I don't seem to be having much luck. No matter what kind of control I use -- which includes textbox, label, and literal, all I can ever get is a BLANK where the reversed-colors text is supposed to be. If I use the <FONT> block with the normal colors, I can still see the text, but if I try to reverse them (or use different colors), all I can get is the blank space.
So to state the problem succinctly: Using the rowdatabound() event, you want to display a block of text inside of a conrol inside of a gridview with one word displayed in the reverse of the normal foreground and background colors. What kind of control would you use? (Note: The field
View Complete Post