Neil M Neil M - 1 year ago 85
C# Question

Referencing embedded resources from an embedded resource

I am using a WinForms browser control to display some content from a html file I have embedded as resource which works fine.

I want to embed some scripts and stylesheets in my application now, but can't figure out how to reference other embedded files from the html page, if at all possible.

My current solution is to load the resources and add them to the browser control's document before I display it, but this might be a bit messy if I want to use something like JQuery.

Answer Source

If the scripts and stylesheets are in the same directory tree as the HTML file, you can use relative paths (e.g. <script src="../scripts/myFoo.js" />). Or am I missing something?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download