1. appdomain. currentdomain. basedirectory, get the applicationProgramRegardless of whether the application is separately deployed as a website or the value returned from the virtual directory.
2. when server. when mappath is available, you can use this to obtain the physical address of the relative path (httpcontext. current will be null, so it will not be able to access the server. mappath ).
User Control and master page reference path:
1.Master pageStyle Reference Path ~ Start, for example :~ /CSS/main.css,User ControlThe CSS Reference Path uses the method in 2,ASPX pageCSS reference uses relative paths.
2. request is used for Javascript, images, and link addresses. applicationpath, for example, <SCRIPT type = "text/JavaScript" src = "<% = request. applicationpath %>/JavaScript/jquery. JS "> </SCRIPT>
Reference other pages to the current directory.