views:

814

answers:

2

Hi,

I have an embedded HTML resource (helloworld.htm) inside my Visual Studio project. (Ie, I've added an HTML file to the project and set its properties to "Embedded Resource".

Within the same application I have a WebBrowser control.

I'd like to direct the WebBrowser control to display the HTML resource using the res:// protocol.

But I can't figure out the exact format needed to address an embedded resource using this style of URL.

Any ideas? Thanks!

A: 

res://project.exe/helloworld.htm

A: 

webBrowser1.DocumentText = ResourceinWebBrowser.Properties.Resources.HTML.ToString();

Where webBrowser1 is the webBrowser control
ResourceinWebBrowser is your exe / Project Name.
'HTML' is the name of your embedded html resource

miniGweek