本帖最后由 R_zhanche 于 2010-06-09 09:20:16 编辑

解决方案 »

  1.   

    我感觉不应该把 WebSite这个名字也存进数据库  大家的理解呢?
      

  2.   

    我的理解是,如果你的web server上不只部署了一个web site, 或者DB中有表在不同库或者schema间的表公用,那么把项目名称保存进去还是很有必要的。
      

  3.   


    我也感觉是   如果保存的话 Path = Base.GetApplicationPath + "/images/A/" + System.IO.Path.GetFileName(fu.PostedFile.FileName);这句话 应该怎么改才能保证路径不会在迁移的时候出错?
      

  4.   

    相对路径
    Server.MapPath("~/");
      

  5.   

    Path = Base.GetApplicationPath + "/images/A/" + System.IO.Path.GetFileName(fu.PostedFile.FileName);这句话 应该怎么改才能保证路径不会在迁移的时候出错?
      

  6.   

    Path = Server.MapPath("~/images/A/")+System.IO.Path.GetFileName(fu.PostedFile.FileName);
      

  7.   

    相对路径:
    stint path=Server.MapPath("~/")+"images/A/" + System.IO.Path.GetFileName(fu.PostedFile.FileName);
    saveAs(path);
      

  8.   

    先问你个问题,你用GetPicPath得到一个路径后,用这个路径做什么?如果只是保存到数据库中,直接用
    Path =  "/images/A/" + System.IO.Path.GetFileName(fu.PostedFile.FileName);
    譬如 /images/A/abc.jpg
      

  9.   


    我的目的就是保存图片或者flash路径, 使取这个路径的时候方便使用