Question

I am trying to retrieve file path for a html file that is embedded in resource (resx file) in VS2008 C# project. I want to give path of this file to native webbrowser control (PIEHtml) to be able to navigate (DTM_NAVIGATE) in my application. I know I can pass the string to this control using DTM_ADDTEXTW but since html text size is so big, I dont want to pass string to the control. I need to somehow extract the file path for this html file embedded inside resource manager.

I tried using but this does not give the file path of html inside assembly:

private ResourceManager resManager = new ResourceManager("AppName.FolderName.FileName", System.Reflection.Assembly.GetExecutingAssembly());

this.lbl.Text = resManager.GetString("StringInResources"); 

and also read Retrieving Resources in Satellite Assemblies but it did not solve my problem.

Can somebody please provide info as to how to achieve this ?

No correct solution

OTHER TIPS

Wouldn't you first have to extract the resource? Or at least load it to memory?

Try this link: http://www.csharper.net/blog/getting_an_embedded_resource_file_out_of_an_assembly.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top