Returns the URL for a file on the Web server.
string GetDownloadFileURL (string serverFile , boolean open)
Argument |
Description |
---|---|
serverFile |
A string containing the name of the file on the application’s virtual file path on the Web server. |
open |
A boolean that determines whether to access the file in open mode or download mode. Values are: |
String. Returns the URL of the file in ASCII format.
The open argument applies only if a Web Forms application user copies the returned URL in the current browser Address box or if you set a hyperlink in the current browser to the returned URL address.
The following code places the URL for a text file in a MultiLineEdit box and includes it as a hyperlink in a StaticHyperLink control:
#if defined PBWEBFORM then
string s
s = GetDownloadFileUrl("c:\aaa.txt", false)
mle_1.text += "~r~n" + s
shl_1.url = s //shl_1: static hyperlink
#end if