posted on Wednesday, December 26, 2007 12:01 AM |

It has to deal with file paths and the relative path. 

We've all seen "../" when we want to go up 1 directory.  My problem was

"images/background-images/" is not the proper path for 100% absoluteness with any URL doing a Server.MapPath.  I need "/images/background-images/".

Warning:  Content most people won't care about but should

When doing a Server.MapPath, the server thinks you're currently in a virtual path of your URL.  So if I'm at http://localhost/archives/2007/article.aspx  and do a Server.MapPath("images/");  I'm going to get back C:\pathToWebApp\archives\2007\images\ in return.

NOW if I did Server.MapPath("/images/");  I'd get back C:\pathToWebApp\images\

Make sense?  Ready ... break.

Tags [ Drunktender pictures ]

Your Comments.

No comments posted yet.

Post Comment
Title *
Name *
Email
Url
Comment *  
Please add 4 and 2 and type the answer here: