How can i change this code to incorporate my earlier code for listing directories and files that i want to show? And how can this code be updated so when you click on the file, it opens.
Here is the code i currently have, which works and displays the folders and files, but clicking on them doesnt open anything.
<script language="C#" runat="server">
static readonly char[] _slashArray = new char[] {'/'};
void PopulateNode(Object source, TreeNodeEventArgs e)
{
TreeNode node = e.Node;
if (node.Value == "Home")
node.Value = "~/";
String rootDirectory = Request.MapPath("~/", Request.ApplicationPath, false);
String fullPath = Request.MapPath(node.Value, Request.ApplicationPath, false);
if (fullPath.StartsWith(rootDirectory) == false)
{
// Mitigate against spoofed callbac ...
Go to the complete details ...