also, if you want a relative path inside your controller, you can use:
string pathName = VirtualPathUtility.ToAbsolute(string.Format(@"~/images/PhotoAlbum/{0}/", propertyId));
or
string pathName = VirtualPathUtility.ToAppRelative(string.Format(@"~/images/PhotoAlbum/{0}/", propertyId));
depending on your need.
hope this helps.
source share