TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sompal Arya
NA
286
50.3k
fliter searching in dataset with highlighting searching item
Feb 11 2014 2:45 AM
in this code this line is not working
return ("<span class=highlight>" + m.Value + "</span>");
suppose m="Delhi"
output screen it is print as "<span class=highlight>Delhi</span>
public string HighlightText(string InputTxt)
{
string Search_Str = FilterSearchTerms.Text;
// Setup the regular expression and add the Or operator.
Regex RegExp = new Regex(Search_Str.Replace(" ", "|").Trim(), RegexOptions.IgnoreCase);
// Highlight keywords by calling the
//delegate each time a keyword is found.
return RegExp.Replace(InputTxt, new MatchEvaluator(ReplaceKeyWords));
}
public string ReplaceKeyWords(Match m)
{
// return ( m.Value);
return ("<span class=highlight>" + m.Value + "</span>");
}
Attachment:
revenue.rar
Reply
Answers (
0
)
string builder
WPF UI update slow Issue