how to manage paths to images, css and javascript files?
What can be the best way to manage paths in different pages which are on different folders?
Let me give a little more details please.
I have aspx files on 3 locations (on root, in admin folder and in members folder) and all forms shares a mster page that is located on root. I have IMAGES, SCRIPTS and CSS folders to contain image, java script and style sheet files.
When I create pages in folders (admin or members) which inherits master page there appears path issues. Bacially all path were correct on root but here they are in correct here in folders.
There come some solutions but these looks not very elegant. For example coping and creating multiple master pages in fodlers was an option for me but should I copy and past images and other files as well ?
Please guide me what is best way to han开发者_运维知识库dle such path issues.
You can keep this ressources at their place. In the master, you use the "~" to mark application-root-relative ressources. It is used in the same way as ".", but "." refers to the current directory. e.g.
~/path/to/image.jpg
instead of
./path/to/image.jpg
精彩评论