www.kevincornwell.com
ASP.NET - Test NTFS Directory Access
    protected void Page_Load(object sender, EventArgs e)
    {
 
        // Show admin link if they have access to the admin directory. //
 
        hyperLinkAdmin.Visible = hasAccessToDir("admin");
    }
 
    protected bool hasAccessToDir(string dir)
    {
        return System.IO.Directory.Exists(MapPath(dir));
    }

Comments RSS


Leave a comment:


Blog | Contact | Gallery | Links | Music | Sandbox | Search | SharePoint | Social Networking | Software | Weather | Web Design


Copyright © 1997-2008 KCSH. All rights reserved.