asp.net服务器绝对路径转换成URL相对路径
摘要:        
//本地路径转换成URL相对路径privatestringurlconvertor(stringimagesurl1){stringtmpRootDir=Server.MapPath(System.Web.HttpContext.Current.Request.ApplicationPath.ToString());//获取程序根目录stringimagesurl2=imagesurl1.Replace(tmpRootDir,"");//转换成相对路径imagesurl2=imagesurl2.Replace(@"\",@"/");r    阅读全文
        posted @ 2011-04-01 18:11 王培 阅读(309) 评论(0) 推荐(0)
 
                    
                 
 浙公网安备 33010602011771号
浙公网安备 33010602011771号