0

I'm having a hard time trying to integrate some things I thought they would be easy to integrate, but I was wrong.

I have an html file and some javascript files (with no server logic in the html code) and i need to embed them in a Visual Studio winform Project in order to use a WebBrowser control an invoke this html file (which includes the .js files) and I need to have the files inside the client application when I call them.

How can I achieve this?

Thanks in advance!

0

1 Answer 1

2

If everything is in one file, you can embed the file in a ResX container and write

webBrowser.DocumentText = Resources.HtmlSource;

If you have multiple files (eg, images and external .js files), you'll need to copy them to physical files on the end-user's machine to make relative paths work. (or you could put them all into a .mhtml file)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.