html与asp.net中的网站路径

html:

路径1:www.test.com/web/admin/login.aspx

路径2:www.test.com/web/error/error.aspx

error.aspx跳转到login.aspx页面   /web为根目录

相对路径:<a href="/web/admin/login.aspx">跳转</a>

相对路径:<a href="../admin/login.aspx">跳转</a>

asp.net

根目录:request.applicationpath.tostring();

其中request还有可以获得很多路径,可上百度查

原文地址:https://www.cnblogs.com/280850911/p/2253807.html