Hi,
All you need is to wrap text you want to hilight with <span class="hilighted">text to hilight<span>
here is the common code from SuggestionTools.cs class.
Code:public static string HighLight(string text, string value)
{
Regex regex = new Regex("\\s(" + value + ")|^(" + value + ")",
RegexOptions.Compiled | RegexOptions.IgnoreCase);
return regex.Replace(text, new MatchEvaluator(MatchEval));
}
private static string MatchEval(Match match) {
return "<span class=\"hilighted\">" + match + "</span>";
}
Hope this helps
Thanks.