<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ Page Language="VB" Debug="true" runat="server"%>
<%@ Import Namespace="System.IO" %>
<%
Dim fn As String = Request.QueryString("udf")
Dim udf = fn & ".txt"
Dim dFile = fn & ".zip"
Dim fp As StreamReader
Dim dFldr As String = Server.MapPath("Files\")
Dim uTxt As String
Dim fDate = File.GetLastWriteTime(Server.MapPath("Code\") &
udf).ToString("D")
fp = File.OpenText(Server.MapPath("Code\") & udf)
uTxt = fp.ReadToEnd()
fp.Close()
%>
<html>
Using the example above, the variable udf causes the test.txt file to be
loaded in the "data" div.
The copy to clipboard function is just fine. It's called using
<a href="javascript:CpyCode()">Copy to clipboard</a>
The CpyCode function has the div with the id="data" hard coded, since now
there is only the one.
Now the problem comes with this old line
<a href="files/test.zip">Download File</a>
How would I write a function that would create a link from the variable
dFile?
TIA
"BD" <Jus...@nothome.net> wrote in message
news:ekqQeVHr...@TK2MSFTNGP03.phx.gbl...