System.IO.Path.GetFullPath("wlkc/GS/c85/content.htm");

解决方案 »

  1.   

    但是我是用File Field空间去浏览文件地址的 
    每次的后缀是不一样的
    不知楼上的方法适不适合啊
      

  2.   

    string sPath = Application.ExecutablePath.ToString().Trim();
    sPath = sPath.Substring(0,sPath.LastIndexOf(@"\")+1);
    sPath += @"wlkc/GS/c85/content.htm";
      

  3.   

    string aaa="wlkc/GS/c85/content.htm";
    aaa=System.Text.RegularExpressions .Regex.Replace(aaa,"/","\");
      

  4.   

    如果我的是 string str="E:\jpkc\wlkc\GS\c85\content.htm" 那怎样把str前面的E:\jpkc\给去掉啊
    就是我任意给E:\jpkc\xxxxx\xxx\xxx\xxxx.xxx付给str,把str的E:\jpkc给截掉
      

  5.   

    这样就行string str= "E:\jpkc";
    int i = str.Length;
    str="E:\jpkc\wlkc\GS\c85\content.htm";
    str = str.Substring(i-1,str.Length-i);