views:

40

answers:

1

is there a way to alter the rendered HTML page in webbrowser control? What i need is to alter the rendered HTML Page in my webbrowser control to highlight selected text.

What i did is use a webclient and use the webclient.Downloadstring() to get the source code of the page, Highlight specific text then write it again in webbrowser. problm is, images along with that page does not appear since they are rendered as relative path.

Is there a way to solve this problem? Is there a way to detect images in a webbrowser control?

+1  A: 

Not sure why you need to change the HTML to lighlight text, why not use IHighlightRenderingServices?

To specify a base url when loading HTML string you need to use the document's IPersistMoniker interface and specify a url in your IMoniker implementation.

Sheng Jiang 蒋晟

related questions