Difference between revisions of "WebFile.URL"

From Xojo Documentation

 
(One intermediate revision by the same user not shown)
Line 8: Line 8:
 
}}
 
}}
 
{{Description
 
{{Description
|text = The url to the file. Best used with [[ShowURL]](WebFile.URL). }}
+
|text = The url to the file. Best used with [[System.GotoURL]]. }}
  
 
==Example==
 
==Example==
  
The Downloading example project uses [[WebFile]].URL to download the png test file that was opened in the App class’s Open event. The code for the Static Download button is:
+
The Downloading example project uses [[WebFile]].URL to download the png test file that was opened in the [[WebApplication.Opening]] event. The code for the Static Download button is:
  
 
<rbcode>
 
<rbcode>
 
   If App.LogoFile <> Nil Then
 
   If App.LogoFile <> Nil Then
     ShowURL(App.LogoFile.URL)
+
     System.GotoURL(App.LogoFile.URL)
 
   Else
 
   Else
 
     MessageBox("Whoops, no logo file available")
 
     MessageBox("Whoops, no logo file available")
 
   End If
 
   End If
 
</rbcode>
 
</rbcode>

Latest revision as of 15:16, 25 January 2022

Read-Only Property (As String )


StringValue = aWebFile.URL

New in 2010r5

Supported for all project types and targets.

The url to the file. Best used with System.GotoURL.

Example

The Downloading example project uses WebFile.URL to download the png test file that was opened in the WebApplication.Opening event. The code for the Static Download button is:

If App.LogoFile <> Nil Then
System.GotoURL(App.LogoFile.URL)
Else
MessageBox("Whoops, no logo file available")
End If