Exemple #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Session["photo_CurrentDirectory"]  = null;
        Session["photo_DirectoryLookup"]   = null;
        Session["photo_DirectoryBrowser"]  = null;
        Session["photo_rootpath"]          = null;
        Session["photo_CurrentPageNumber"] = null;
        Session["photo_CurrentPhotos"]     = null;
        if (!IsPostBack)
        {
            string projcode = Context.Request.Params["ProjectCode"];
//            string photosPath = Context.Request.FilePath + Path.DirectorySeparatorChar;
            string           mappedPhotosDbPath = Context.Request.MapPath("") + "\\photos";
            DirectoryBrowser dirBrowser         = new DirectoryBrowser(mappedPhotosDbPath, "");
            if (projcode != null)
            {
                string rootpath = dirBrowser.GetRootPath(projcode);
                if (rootpath != null)
                {
                    EnterAlbum(rootpath);
                }
            }
        }
    }