I am trying to read filenames from a folder on a virtual directory into a datagrid. It should be simple (I think) but while the page loads just fine, the datagrid is nowhere to be seen and I don't get any kind of error.
Just to make sure I could link to the folder, I created a "hard link" on a regular HTML page on the site and it works fine.
Here is my code:
<%@ Import Namespace="System.IO" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="chemacc.aspx.vb" Inherits="webforms.chemacc"%>
<HTML>
<HEAD>
<title>Chemical Acceptance</title>
<script runat="server">
Sub PageLoad
Dim sp as string
sp = Server.MapPath ("/p1/Quality/Acceptance_Recs/ChemAcc/")
dgCA.DataSource = Directory.GetFiles(sp, "*.pdf")
dgCA.DataBind
End Sub
</script>
<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta content="Microsoft Visual Studio.NET 7.0" name="GENERATOR">
<meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<link href="http://intranet.talleyds.com/viper/styles/tocDOC.css" type="text/css" rel="stylesheet">
</HEAD>
<body MS_POSITIONING="GridLayout">
<%
Response.WriteFile("includes/qHeader.asp")
%>
<table cellPadding="5" width="300" border="1">
<tr>
<th align="center">Chemical Acceptance Records</th></tr>
</table>
<asp:dataGrid id="dgCA" style="Z-INDEX: 101; LEFT: 24px; POSITION: absolute; TOP: 64px" runat="server" AllowPaging="True" AllowSorting="True" BorderStyle="Solid" BorderWidth="1px" ForeColor="DarkMagenta" />
</body>
</HTML>
I looked for a similar issue on the site but didn't find one.
Any and all advice or help would be MOST appreciated!:rolleyes: