J
John Spiegel
Hi all,
I'm trying to do something simple here...just provide a link from which a
user can download a file. I'm using Server.MapPath() in my codebehind to
find out physically where the file is then binding that in the aspx page
like so...
if (!IsPostBack)
{
Session["DownloadPath"] = Server.MapPath(@"Downloads");
Page.DataBind();
}
<A href='<%# @"file:///" + Session["DownloadPath"].ToString() +
@"\MyFile.pdf" %>'>
Acrobat PDF</A>
It works in development but, of course, when I drop it on the web server
(hosted on one of those cheap $8 / mo. services), nothing happens when I
click the link. Hovering over the link displays what looks viable to me:
"file:///d:/accounts/ouraccount/downloadfolder/MyFile.pdf"
but nothing happens. Am I missing something in my process or is it likely
an issue to take up with the hosting company?
TIA,
John
I'm trying to do something simple here...just provide a link from which a
user can download a file. I'm using Server.MapPath() in my codebehind to
find out physically where the file is then binding that in the aspx page
like so...
if (!IsPostBack)
{
Session["DownloadPath"] = Server.MapPath(@"Downloads");
Page.DataBind();
}
<A href='<%# @"file:///" + Session["DownloadPath"].ToString() +
@"\MyFile.pdf" %>'>
Acrobat PDF</A>
It works in development but, of course, when I drop it on the web server
(hosted on one of those cheap $8 / mo. services), nothing happens when I
click the link. Hovering over the link displays what looks viable to me:
"file:///d:/accounts/ouraccount/downloadfolder/MyFile.pdf"
but nothing happens. Am I missing something in my process or is it likely
an issue to take up with the hosting company?
TIA,
John