Click here to Skip to main content
15,885,881 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When I am trying to Load an html using NavigateToString stored in LocalStorage folder of Windows 10 application. It is not loading its relative files like CSS, Javascript, Images.

I have used base tag on the top as well. Same concept works for Silverlight application.

Please help me on this.

What I have tried:

Used NavigateToString for navigating in WebView. The HTML files are stored in LocalStorage folder.
Posted
Updated 1-Aug-16 23:55pm

1 solution

hi Mohitdb7
consider these:
1.you cant launch html file present directly under localfolder (security reasons) but you can launch html files from inside subfolders of localfolder
eg: ms-appdata:///local/subfolder/my.html can be launched from webview.

2.your other data (images etc.) will work now with address relative to your html file.

3.you need to use navigatetolocalstreamuri and buildlocalstreamuri along with resolver to interact between javascript and native (when launching from localstorage)
you can refer to this link to now more about point 3. WebView.NavigateToLocalStreamUri method - Windows app development[^].

hope it helps.

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900