Hello Friends,
I am creating IE BHO in which Browser words that matched with database gets highlight and onmousehover description is getting displayed as popup. Till now everything is running fine.
Below is my code
oleda.SelectCommand = cmd;
oleda.Fill(dt);
if (dt.Rows.Count > 0)
{
string TextToHighlight = "", TextAsDiscription = "";
int count = dt.Rows.Count;
for (i = 0; i < count; i++)
{
TextToHighlight = "";
TextAsDiscription = "";
TextToHighlight = dt.Rows[i]["words"].ToString().ToLower();
TextAsDiscription = dt.Rows[i]["Definition"].ToString().ToLower();
if (Regex.IsMatch(PageText, string.Format(@"\b({0})\b", TextToHighlight)))
{
TotalWordCount++;
PageText = HighlightSearchKeyWords(TextToHighlight, TextAsDiscription, PageText);
MatchedWords = MatchedWords + TextToHighlight + ",";
}
}
}
document.body.innerHTML = PageText;
My problem is in Pagetext variable complete data is coming along with Single quotes in word description but after assign to document.body.innerHTML, words description getting truncated after single quotes.
Can anybody suggest me the issue or any solution for this.
Please help me in sorting out this issue.
Thanks