Is there any benifit to using one of these methods over the other when resolving paths which start with the tilde (~)?
Generally, what is a better practice, should you be sending relative paths or absolute paths down in your html?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The difference between ResolveUrl and ResolveClientUrl is that ResolveClientUrl returns a path relative to the current page, ResolveUrl returns a path relative to the site root:
http://www.andornot.com/blog/post/ResolveUrl-vs-ResolveClientUrl.aspx
I would recommend using absolute paths.
Edit: Rick Strahl posted a nice article about this
Edit2: Removed bit about caching. Does not add to the answer and may not necessarily be accurate.
http://west-wind.com/weblog/posts/132081.aspx