I am having an issue with the server.mappath method. My current code is:
var imageroot = Server.MapPath("~/Images/Property/");
var foldername = rPropertyId.ToString();
var path = Path.Combine(imageroot, foldername);
When I upload this path into my database, I expect to see the following URL:
/images/property/1/filename.jpg
But what I actually see is this URL:
C:\Users\gavin\Dropbox\My Web Sites\StayInFlorida\Images\Property\1\filename.jpg
How do I get around this? I'm assuming I have to change the MapPath method, but I've tried a few things but I've had no luck.