How to retrieve path for a file embedded in Resources (Resource Manager)

Posted by curiousone on Stack Overflow See other posts from Stack Overflow or by curiousone
Published on 2010-03-30T02:28:03Z Indexed on 2010/05/18 3:40 UTC
Read the original article Hit count: 215

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 ?

© Stack Overflow or respective owner

Related posts about c#

Related posts about resourcemanager