Connecting Tech Pros Worldwide Forums | Help | Site Map

How search text In webbrowser control?

Newbie
 
Join Date: Sep 2009
Posts: 21
#1: Oct 7 '09
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

markmcgookin's Avatar
Moderator
 
Join Date: Dec 2006
Location: Northern Ireland / England
Posts: 546
#2: Oct 7 '09

re: How search text In webbrowser control?


Do you mean like, CTRL+F find function in a normal browser on the PC?
Newbie
 
Join Date: Sep 2009
Posts: 21
#3: Oct 8 '09

re: How search text In webbrowser control?


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.
Reply