string pass = Request.ApplicationPath + "/" + "UserRoles/ChangePassword.aspx";
 Response.Write("<script Language='JavaScript'> alert('您当前使用的是默认密码,为了安全起见修改!') ; window.parent.LeftFrame.location.href ='" + pass + "';  </script>");读取出的路径为何是:res://C:\WINDOWS\system32\shdoclc.dll/dnserror.htm#http://userroles/ChangePassword.aspx
http://userroles/ChangePassword.aspx这个正确的路径
为何???急 

解决方案 »

  1.   

    System.IO.Directory.GetCurrentDirectory
      

  2.   

    我的是在asp.net(C#)中的 啊
      

  3.   

    string pass = Request.ApplicationPath +  "UserRoles/ChangePassword.aspx";
      

  4.   

    window.parent.LeftFrame.location.href 这个地址还要拼出来?你直接写ChangePassword.aspx不就行了吗
      

  5.   

    window.parent.LeftFrame.location.href ='" + pass + "'; </script>");
    pass:的路径正确写法1、../../xx.aspx 2、http://xx/xx/xx.aspx就是pass错了
      

  6.   

    string pass = Request.ApplicationPath + "/" + "UserRoles/ChangePassword.aspx";
     Response.Write("<script Language='JavaScript'> alert('您当前使用的是默认密码,为了安全起见修改!') ; 
    window.location.href  ='" + pass + "'; </script>");
    不好意思上面写错了,是(window.location.href)
    读取出的路径为何是:res://C:\WINDOWS\system32\shdoclc.dll/dnserror.htm#http://userroles/ChangePassword.aspx