locked
Open html files with css and images all saved on ApplicationData in a webview RRS feed

  • Question

  • Hello

    I am downloading .zip files into ApplicationData.Current.Localfolder inside file1.zip folder. I wanna to display the html files inside a webview in my metro app. Html files contain images and are styled using css file under file.zip

    I am currently using HTTPserver http://blog.jsolutions.co.uk/?p=492

    webView1.Navigate(new Uri("http://localhost:8088/" + filename + "/" + rootfolder + "/" + htmlfile.Name));

    But I've been told that localhost wont be allowed in the released version on Windows store.

    I tried using "ms-appdata:///","ms-appx-web:///" none worked it shows blank on webview.And using NavigateTostring isn't the solution for me because html wont be styled and images wont show.

    What should I use to make the content with styling and images appear without using the localhost?

    Tuesday, April 2, 2013 6:42 AM

Answers

  • Then in webview you cannot display html from Application Data location (except http server hack). This is already covered in forum so many times.


    Thanks,
    Sachin

    Vocabmeter | My Samples |Personal Website


    • Edited by Sachin S Wednesday, April 3, 2013 7:11 AM
    • Proposed as answer by Aaron Xue Wednesday, April 3, 2013 9:07 AM
    • Marked as answer by Aaron Xue Monday, May 6, 2013 9:09 AM
    Wednesday, April 3, 2013 7:09 AM

All replies

  • Here is the sample code which shows one way using which application can display html page generated dynamically.

    Thanks,
    Sachin
    Vocabmeter | My Samples | Personal Website



    • Edited by Sachin S Tuesday, April 2, 2013 2:36 PM
    Tuesday, April 2, 2013 2:32 PM
  • I don't need to generate my htmls.Html files are already there and saved under ApplicationData.I need to know how to show them into webview without using localhost solution
    Wednesday, April 3, 2013 6:58 AM
  • Then in webview you cannot display html from Application Data location (except http server hack). This is already covered in forum so many times.


    Thanks,
    Sachin

    Vocabmeter | My Samples |Personal Website


    • Edited by Sachin S Wednesday, April 3, 2013 7:11 AM
    • Proposed as answer by Aaron Xue Wednesday, April 3, 2013 9:07 AM
    • Marked as answer by Aaron Xue Monday, May 6, 2013 9:09 AM
    Wednesday, April 3, 2013 7:09 AM