Welcome Guest Search | Active Topics | Sign In | Register

Images in page Options
Yannis
Posted: Saturday, June 29, 2019 5:04:24 AM
Rank: Newbie
Groups: Member

Joined: 6/29/2019
Posts: 2
Hello,

I have just started trying the the EO.WinForm.WebControl and I have the following problem :
I am a using the this.webBrowserView.LoadHtml(htmlSource) to load the text.
The text contains an image, something like
"...<image src=\"c:\\users\\yannis\\appdata\\local\\temp\\alcmum_40552160-cd11-48fe-a971-b6da7abf8a40\\img5_001.jpeg\" width=\"240\"></image>..."
but the image does not show.
Do note that it is shown in the MS WebBrowser control.
Any idea what may be causing it?

Thank you
eo_support
Posted: Monday, July 1, 2019 8:24:14 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi,

Please follow these steps:

1. Load a local Url into the WebView first. You only need to do this once;
2. When you call LoadHtml that contains local image, make sure you pass a local base Url. For example:

Code: C#
webView.LoadHtml(your_html, "c:/test.html");


The image won't be loaded by default because the WebView is initialized in the "Internet" security zone, and code/page in Internet zone is not allowed to access local resources. The two steps above are needed to switch it to "Local" security zone.

Please let us know if this works for you.

Thanks!
Yannis
Posted: Monday, July 1, 2019 8:50:35 AM
Rank: Newbie
Groups: Member

Joined: 6/29/2019
Posts: 2
Thank you


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.