469,343 Members | 5,524 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,343 developers. It's quick & easy.

How search text In webbrowser control?

Hi,

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);
  3.  
  4.                       string key = textBox1.Text;
  5.                       String substitution = "<span style='background-color: rgb(255, 255, 0);'>" + key + "</span>";
  6.                       html.Replace(key, substitution);     
  7.  
  8.           webBrowser1.Document.Body.InnerHtml = html.ToString();
  9.  
How possible above think with web browser control in window mobile please give idea if you know solution for this thread.
thanx
Oct 7 '09 #1
2 4557
markmcgookin
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
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.