Hola!
Aquí tienes todo el código de la página que he utilizado para la prueba:
Código:
<%@ Page Language="VB" %>
<%@ Import Namespace="System.IO" %>
<script language="VB" runat="server">
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim dirInfo As New DirectoryInfo(Server.MapPath("SuperPinwi"))
articleList.DataSource = dirInfo.GetFiles("*.*")
articleList.DataBind()
End Sub
Protected Sub articleList_Link(ByVal rutaFichero As Object, ByVal e As DataGridItemEventArgs) Handles articleList.ItemDataBound
If e.Item.Cells(0).Controls.Count > 0 Then
Dim a As HyperLink
a = CType(e.Item.Cells(0).Controls(0), HyperLink)
a.NavigateUrl = a.NavigateUrl.Replace(Server.MapPath(""), "~")
End If
Return
End Sub
</script>
<html>
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:DataGrid runat="server" ID="articleList" Font-Name="Verdana" AutoGenerateColumns="False"
AlternatingItemStyle-BackColor="#eeeeee" HeaderStyle-BackColor="Navy" HeaderStyle-ForeColor="White"
HeaderStyle-Font-Size="15pt" HeaderStyle-Font-Bold="True">
<Columns>
<asp:HyperLinkColumn DataNavigateUrlField="FullName" DataTextField="Name" HeaderText="File Name" />
<asp:BoundColumn DataField="LastWriteTime" HeaderText="Last Write Time" ItemStyle-HorizontalAlign="Center"
DataFormatString="{0:d}" />
<asp:BoundColumn DataField="Length" HeaderText="File Size" ItemStyle-HorizontalAlign="Right"
DataFormatString="{0:#,### bytes}" />
</Columns>
</asp:DataGrid>
</div>
</form>
</body>
</html>
Espero que así te funcione, ya me dirás.
Saludos!