When *. JS is referenced in the master page Relative Path .
1. Use request. applicationpath to obtain the path.
2. use scriptmanager
3. use ~ Symbol pointing to server and path
<Asp: scriptreference Path = "~ /JS/jquery. js "/>
</Scripts>
<Script language = "JavaScript" src = "~ /JS/jquery. js "type =" text/JavaScript "> </SCRIPT>
Method 1: This method can solve the problem of relative paths. We recommend that you use this method.
Method 2: add a lot of useless ASP. Ajax JS references to some pages.
Method 3: "~" It can only be called on the server side. For example, if it is used in a server control, JS cannot be referenced here.
-----------------------
Reference an image on the dashboard page. If you use the control, using the relative path may cause an error.
After the parent page is loaded, the position of the referenced image will change to the relative path relative to the content page. The picture you reference may be wrong!
The reason is that is a client control (Note: other client controls also have the same problem, such as <A> )---
There are two solutions:
1. Use server controls:<Asp: image/>
2.