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 | Sandbox | Social Networking | Weather | Web Design


Copyright © 1997-2009 KCSH. All rights reserved.