<%@ Register TagPrefix="portal" TagName="Footer" Src="~/DesktopPortalFooter.ascx" %>
其中路径中~/是什么意思,大家有见过的吗?真是新鲜,搞得时间长了,什么都能碰见..你们知道吗?

解决方案 »

  1.   

    ASP.NET2.0的东西以下来自MSDN:
    To overcome these disadvantages, ASP.NET makes available the Web application root operator (~), which you can use when specifying a path in server controls. ASP.NET resolves the ~ operator to the root of the current application. You can use the ~ operator in conjunction with folders to specify a path that is based on the current root.
      

  2.   

    面试问题:
    ~/
    /

    上面三个在asp.net中作为相对路径分别表示什么?
      

  3.   

    自己回答:
    ~/:应用程序根目录
    /:虚拟路径根目录,即本机http://localhost
    空:我不确定,呵呵,请大侠接上