I am downloading pdf files directly from a folder 'uploads' in the root of the website, using the basic code below for test.
This displays the files as a live hyperlink as required, however, when clicked to open the file; Error not found; Error 404 Requested URL: /Newsletter1.pdf. The uploads folder path seems to be missing, preventing the selected files from being viewed. I have changed the UrlFields and TextFields to 'FullName' which does display the full root of the files, but now although displayed as live links they are no longer active.
I have tried a multitude of variations without success. Can anyone Help please?
<script type="text/vbscript" runat="server">
Sub Page_Load(sender as Object, e as EventArgs)
Dim dirInfo as New DirectoryInfo(Server.MapPath("~/uploads/"))
articleList.DataSource = dirInfo.GetFiles("*")
<form id="form1" runat="server">
<asp:GridView runat="server" id="articleList"
<asp:HyperLinkField DataNavigateUrlFields="name" DataTextField="name"