Hi
I have an HTML file in the same folder of my webapp exe file.
I new to show this file in a webHtmlviewer.
I tried to solve it using webHtmlviewer.LoadPage(file://ExePath/Myfile.html)
No sucess and I am not finding a method to do it.
Any idea how to do it ?
Thanks
I suppose you are deploying standalone. You cannot access the drive on the server from the Web.
You need to drag the file within the project, and use a webfile to make it available to the WebHTMLViewer.
Thanks @Michel_Bujardet
Yes, it is a standalone app.
I suppose that was the problem and I do need to generate a WebFile that then I could show it in a WebHTMLviewer.
Do you have a pice of code in order to do it so ?
The relevant page of the LR is here:
https://documentation.xojo.com/api/web/webfile.html
- Add a property MyFile as WebFile to the WebPage
- I opened an html file called “logo.htm” from the desktop here:
Dim f As FolderItem = SpecialFolder.Desktop.child("logo.htm")
If f <> Nil And f.Exists Then
MyFile = WebFile.Open(f) // "MyFile As WebFile" is a property on the App object
End If
If MyFile <> Nil Then
me.ShowURL(MyFile.URL)
End If