472,131 Members | 1,313 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,131 software developers and data experts.

How search text In webbrowser control?


i display some text in web browser control from my xml file. now i want to
search specific word in web browser control and highlight that text.
to do this thing i am trying to get text from web browser control but in
window mobile web browser control does not support to access body text.
like this in other window application with web browser control.
Expand|Select|Wrap|Line Numbers
  1.  HtmlDocument doc2 = webBrowser1.Document.DomDocument as HtmlDocument;
  2.             StringBuilder html = new StringBuilder(webBrowser1.Document.Body.OuterHtml);
  4.                       string key = textBox1.Text;
  5.                       String substitution = "<span style='background-color: rgb(255, 255, 0);'>" + key + "</span>";
  6.                       html.Replace(key, substitution);     
  8.           webBrowser1.Document.Body.InnerHtml = html.ToString();
How possible above think with web browser control in window mobile please give idea if you know solution for this thread.
Oct 7 '09 #1
2 4637
648 Expert 512MB
Do you mean like, CTRL+F find function in a normal browser on the PC?
Oct 7 '09 #2
Thanx mr. markmcgookin

Yes Like same thing CTRL+F find function in a normal browser on the PC i want to do with web browser control in Window Mobile.
Oct 8 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by ASP .NET Newbie | last post: by
reply views Thread by Jim Hubbard | last post: by
7 posts views Thread by Nikolay Petrov | last post: by
12 posts views Thread by Alex Clark | last post: by
8 posts views Thread by Prosperz | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.