How to load external storage html file in web view

hi all,
    how to load external storage html file in web view, please help me
   " ms-appdata://local/index.html" not working
veerasuthan veerakesan

It need be read as string. Then load the string by  Webview.NavigateToString.
Sample as below
string htmlstring = string.Empty;
try
var htmlfile = await Windows.Storage.ApplicationData.Current.LocalFolder.OpenStreamForReadAsync("a.html");
using (System.IO.StreamReader streamReader = new System.IO.StreamReader(htmlfile))
htmlstring = streamReader.ReadToEnd();
webview.NavigateToString(htmlstring);
catch(Exception ex)
Debug.WriteLine(ex.ToString());
在現實生活中,你和誰在一起的確很重要,甚至能改變你的成長軌跡,決定你的人生成敗。 和什麼樣的人在一起,就會有什麼樣的人生。 和勤奮的人在一起,你不會懶惰; 和積極的人在一起,你不會消沈; 與智者同行,你會不同凡響; 與高人為伍,你能登上巔峰。

Similar Messages

  • How to load an exteranl html file in a div

    All-
    Im sure this has been covered but I can't find what I'm looking for.
    How do I load content from an external html file into a div in Edge?
    I want my client to have the option of updating the html files so i don't have to edit them in edge
    The files are inside of a folder called "content"and the index.html file is outside of this folder.
    Thanks

    I tried this and it works. Thanks.
    How can I control the EA timeline with the loaded HTML? I would like to animate the "webPageDisplayPort" div on stage when a user click a button or image inside the loaded HTML.
    HTML code:
    <div class="image" onClick="comp.play();"></div>

  • How to display local HTML file in web-view?

    Hello everyone,
    we have no problem with showing of remote HTML content from server in box on page in web view. But how we can show such a content when included in HTMLResources? In guide is just "Display a local HTML file in an in-app browser", which works wihout problem, but we don't want to show this HTML content in in-app viewer, it should be part of page.
    Thanks
    Martin

    Now i'm confused. In guide is this:
    To use local HTML files, click the folder icon and specify the local HTML file. The HTML file (such as index.html) should appear in a folder that includes any images or scripts used in the HTML file.
    But no info where such a local HTML file should reside. If this file is in HTMLResources, it is ignored.

  • HT201250 I have two external hard drives. One is my Time Machine backup drive.  The other I use for external storage of files (documents, photos, movies, etc).  Can I set Time Machine to backup BOTH my Mac hard drive and my other external hard drive?

    I have two external hard drives. One is my Time Machine backup drive.  The other I use for external storage of files (documents, photos, movies, etc).  Can I set Time Machine to backup BOTH my Mac hard drive and my other external hard drive?

    Yes you can make multiple backups on one hard drive, for example if you’ve 1TB hard drive installed in your PC and you’ve two Mac Machines with 500GB drive each then you just make two backup images with size of 500GB each.
    http://www.halfspot.com/use-your-pc-hard-drive-for-time-machine-backup/

  • How do I Open an HTML file for iOS?

    How do I open an HTML file for iOS using acrobat?

    This is a forum for Adobe Reader for iOS. Acrobat doesn't run on iOS. You need to run it on a Mac or Windows computer. In Acrobat, you can choose File > Create > PDF from Web Page to do what you want. You cannot do that in iOS.

  • How to read a text/html file in java regardless of its encoding?

    Hi All,
    How to read a text/html file in java regardless of its encoding?
    1. Is there any way to identify that a file (read using FileInputStream/or any other means with java.io package) has been saved with which type of encoding i.e. whether the file is using ANSI encoding or Unicode encoding or other?
    2. Is there any standard way to read an encoded file (i.e. files having UTF-16 format for Asian locales character support) and un-encoded file (i.e. files having ordinary ANSI format) correctly without knowing the user input?
    The problem is that while creating an instance of 'InputStreamReader' (ISR) we can pass the encoding type used (otherwise it takes the system's default encoding type), and the ISR expects the file to be in the same encoding format otherwise it reads it as some junk. But we don't know which file the user is going to pass whether it is Unicode (for Asian locales file should be in Unicode) with or ANSI coded (for non-Asian / English locales user generally uses ANSI encoding).
    Regards,
    Sam

    1. There is no reliable way of guessing the encoding of a file without that information. Thats why XML for example has very strict rules wrt. it's encoding (short form: use UTF-8 or UTF-16, if you use anything else, you'll have to specify it)
    2. you might be able to make an educated guess if the possible range of encodings is limited, but it will probably never be 100% certain
    3. The HTML file might have a header entry "<meta http-equiv..." that tells you about it's encoding. You could try to read the start of the file and see if you find that, then if you found it re-read the entire file.
    regards

  • How to load images from css file in JavaFX 8

    I have this css file which loads images in JavaFX 8 application:
    #pill-left {
        -fx-padding: 5;
         -fx-border-image-source: url("/com/dx57dc/images/left-btn.png");
        -fx-border-image-slice: 4 4 4 4 fill;
        -fx-border-image-width: 4 4 4 4;
        -fx-border-image-insets: 0;
        -fx-border-image-repeat: stretch;
         -fx-background-color: null !important;
    #pill-left:selected { -fx-border-image-source: url("/com/dx57dc/images/left-btn-selected.png"); }
    #pill-left .label {
        -fx-text-fill: #d3d3d3;
        -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
    #pill-left:selected .label {
        /* -fx-text-fill: black; */
        -fx-text-fill: white;
        -fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
    #pill-center {
        -fx-padding: 5;
         -fx-border-image-source: url("/com/dx57dc/images/center-btn.png");
        -fx-border-image-slice: 4 4 4 4 fill;
        -fx-border-image-width: 4 4 4 4;
        -fx-border-image-insets: 0;
        -fx-border-image-repeat: stretch;
         -fx-background-color: null !important;
    #pill-center:selected { -fx-border-image-source: url("/com/dx57dc/images/center-btn-selected.png"); }
    #pill-center .label {
        -fx-text-fill: #d3d3d3;
         -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
    #pill-center:selected .label {
        -fx-text-fill: black;
        -fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
    #pill-right {
        -fx-padding: 5;
        -fx-border-image-source: url("/com/dx57dc/images/right-btn.png");
        -fx-border-image-slice: 4 4 4 4 fill;
        -fx-border-image-width: 4 4 4 4;
        -fx-border-image-insets: 0;
         -fx-border-image-repeat: stretch;
        -fx-background-color: null !important;
    #pill-right:selected { -fx-border-image-source: url("/com/dx57dc/images/right-btn-selected.png"); }
    #pill-right .label {
         -fx-text-fill: #d3d3d3;
        -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
    #pill-right:selected .label {
        -fx-text-fill: black;
        -fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
    The images are located at the Java package com.dx57dc.images
    In Java 7_25 this code works as expected but in JavaFX 8 b99 I get this error:
    ava.lang.NullPointerException
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1129)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
    at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
    at com.sun.javafx.sg.prism.NGGroup.renderChildren(NGGroup.java:233)
    at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:199)
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1249)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
    at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
    at com.sun.javafx.sg.prism.NGGroup.renderChildren(NGGroup.java:233)
    at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:199)
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1249)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
    at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
    at com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:99)
    at com.sun.javafx.tk.quantum.AbstractPainter.paintImpl(AbstractPainter.java:210)
    at com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:95)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
    at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:129)
    at java.lang.Thread.run(Thread.java:724)
    D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
    20 total resources being managed
    4 permanent resources (20.0%)
    1 resources locked (5.0%)
    7 resources contain interesting data (35.0%)
    0 resources disappeared (0.0%)
    D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
    20 total resources being managed
    4 permanent resources (20.0%)
    1 resources locked (5.0%)
    7 resources contain interesting data (35.0%)
    0 resources disappeared (0.0%)
    D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
    20 total resources being managed
    4 permanent resources (20.0%)
    1 resources locked (5.0%)
    7 resources contain interesting data (35.0%)
    0 resources disappeared (0.0%)
    What is the proper way to load images from css in Java 8?
    Ref
    How to load images from css file in JavaFX 8 - Stack Overflow

    There is nothing special to do - you execute the statement from your program just like any other SQL statement.  The only thing to be aware of are the privilege/permission issues:
    When loading from a file on a client computer:
    READ CLIENT FILE privilege is also required for the database user.
    Read privileges are required on the directory being read from.
    The allow_read_client_file database option must be enabled.
    The read_client_file secure feature must be enabled.
    Revoking these privileges is also the only way you can prevent a user from executing the statement.

  • How do i send an html file exported from muse as email blast with images and live links?

    My question it:
    How do i send an html file exported from muse as email blast with images and live links?
    I have designed a "website" in adobe muse and exported it as an html file. I am not sure how to send my .html file in an email!
    Best,
    Nicole

    Unfortunately, the answer is, you don't. The requirements for HTML displayed in an e-mail reader are very different than those for HTML displayed in a browser. The output of Muse won't work as an HTML e-mail. You could upload the Muse site as a website and provide a link to it in an e-mail, but the HTML generated by Muse is not suitable for direct display by an e-mail program.

  • How to recover missing index.html files

    How to recover required index.html files in Pages?

    http://www.freeforum101.com/iworktipsntrick/viewtopic.php?t=308&mforum=iworktips ntrick
    Peter

  • How to load data into html:select using Struts ?

    How to load data into <html:select> using Struts ?
    I can not load an array or collection (static or dynamic data) into drop down list control by <html:select /> Struts.
    please use:
    <html:select >
    <html:options />
    </html:select >
    Please help me. please detail it. thanks a lot.
    Message was edited by:
    tranminhman

    In order to load a collection or array of data you can use <html:select> with <html: options collection="" name=""/>
    here collection attribute refers to the Arraylist or Array of data and name is the name of the Form bean.
    Hope this helps...
    Chaitanya V

  • Adf11g how to open pdf or html files from  webservice

    hi all,
    adf11g how to open pdf or html files from webservice .

    Hi,
    This is standard functionality, that you can read more about in the OLM User Manual. You can upload the files to an OLM content server or to any other content server that can be accessed with a URL.
    Regards Anders Northeved

  • How do I read a properties file in WEB-INF without hard-coding a path?

    Hello,
    How do I read a properties file in WEB-INF without hard-coding a path?
    I tried:
    Properties properties = new Properties();
    properties.load(new FileInputStream("db.properties"));
    driver = properties.getProperty("driver");
    but it cannot find the db.properties file.
    Thanks for the help.
    Frank

    Don't use a File to read those properties.
    Better to use the servlet context and
    getResourceAsStream() method to get the InputStream.
    It'll look for any file in the CLASSPATH. If you put
    that properties file in the WEB-INF/classes directory
    you'll have no problems, even if you deploy with a
    WAR file.Completely agree with this approach. Just have to mention the following for completeness
    according to the API,
    "This method is different from java.lang.Class.getResourceAsStream, which uses a class loader. This method allows servlet containers to make a resource available to a servlet from any location, without using a class loader. "
    So using this method, the resource can be anywhere under your web context, not just in the classpath.
    Cheers,
    evnafets

  • Html file in web page composer

    hi expert,
    i have create one html file. the html file contain jsp script. the output is very well when i run it on my pc but when i put it in container of web page composer, the output is not display. why its happen?how can i use the html file that contain jsp script in web page composer?
    thanx in advance,
    faeza

    Hi
    You can create a new layout with width and height as per your requirements and use the layout in WPC.
    For creating new layouts, check the help link below
    http://help.sap.com/saphelp_nw70/helpdata/EN/45/d2970be57f4ebbe10000000a11466f/content.htm
    Regards,
    Yoga

  • How can i password protect some files and web sites?

    How can I possword protect some files and web sites on my mac air so others using my laptop can't access them?

    Set a password for your user; create other user accounts for when other people want to use it. You can create a "guest" login which gets wiped after every logout, if that's more appropriate for them.
    Matt

  • How to load external resources such as JavaScript files, etc. ?

    Hello,
    I'd like to put my resources files such as my scripts, my stylesheets, in a jar file, included in my webapp.
    How can I refer to these files in my JSP file ?
    Should I make a filter ?
    Can someone help me please ?
    Thanks in advance.
    bgOnline

    using loadjava I can load commons-net-ftp-2.0.jar and my jar. When i execute pl/sql wrapper for defined java stored procedure it results into exception.
    retval=-29532;ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
    Same code works as Java application. I also granted socket permissions
    DBMS_JAVA.GRANT_PERMISSION(
    'SCHEMANAME', 'java.net.SocketPermission', REPLACEWITHHOST||':'|| REPLACEWITHPORT, 'connect,resolve');
    This did not resolve the error. Since i do not have control external java library and it works as standalone application....
    do you know any workarounds? Any ideas on implementing FTP functionality in plsql on oracle 11g database?
    Thanks
    Madan
    Edited by: MadanShah on Aug 8, 2009 11:15 AM

Maybe you are looking for

  • Ipod cannot be updated, WHY??

    When I try to sync my Ipod Itune's is giving me a red X saying, The Ipod "name ipod" cannot be updated.The required file cannot be found. I really would like to look at my photos and movies that i'm trying to put in it. I've reset my Ipod,redownloade

  • How to reboot a n hp 2000

    I am having a serious promlem with my hp 2000 every time i turn it on it is fine until it gets to the welcome screen then it just stays there. I tried to reboot it but i don't know what settibgs to use so it keeps telling me the reboot has fail then

  • BSP - How to set header-field "no-store"

    Hello. I need to set the HTTP-header-field "no-store" in a BSP-application. The Problem is, that i do'nt know, how to do this. I just do'nt know, which strings have to be passed to the method "set_header_field". The W3C-RFC gives the following inform

  • Werb services to proxy- synchronous scenario

    Hi experts,    Can anyone help me with the detailed scenario of  synchronous WEB SERVICES TO PROXY step by step. I tried searching in sdn but  no luck. Also tell me  here that XI will expose the Outbound Interfaces as a Web Service Interface.  how th

  • Is ANSI ENCODING possible using file/j2see adapter

    Hi all,             I am doing a file to file bypass scenario .My client has demanded that the output file should be in ANSI format.I checked the <b>file.encoding</b> option in sap-help but ANSI is not available can u suggest that what encoding type