Reputation: 19365
I want to show a html document in a web browser control (WinForms). The html file should contain images, that are embedded resources.
How can I modify the html that is shown in the webbrowser to replace the src attribute of the img tags to somehow show the embedded resource without copying it into the file system?
Upvotes: 1
Views: 1171
Reputation: 419
As you know Data URI's have problem with older browsers (IE < 8) so :
Upvotes: 1
Reputation: 16575
You could use src="data:image/png;base64,....
and replace the ....
with the base64 encoded string.
You'll need to replace the src="url"
for the img tags in the given HTML, which means you would have to store the HTML somewhere on disk temporarily, so I guess doesn't solve the problem, unless you have access to the HTML.
Upvotes: 2