转相对路径

  #region 轉換相對路勁         public string Urlconvertor(string imagesurl1)         {             string tmpRootDir = Server.MapPath(System.Web.HttpContext.Current.Request.ApplicationPath.ToString());//获取程序根目录             string imagesurl2 = imagesurl1.Replace(tmpRootDir, ""); //转换成相对路径             imagesurl2 = imagesurl2.Replace(@"\", @"/");             return imagesurl2;         }         #endregion
相关文章
相关标签/搜索