View Single Post
  #12 (permalink)  
Old April 14th, 2006, 11:24 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts

Before you send me that beer, you may want to consider the path you store in the database.

If you store something like /localhost in the database, on your machine things will work. However, this schema will break when you move your site to another machine and access it like In that case, localhost will no longer exist so your images will break.

That's why I suggested earlier to store images from the virtual root path.

So, if you browse to your site like this:


and you access an image like this:


then only store /Images/MyImage in the database. Once you move to, you can still access the image with where the italic part is the dynamic path from the database.

Hope this helps,

Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Reply With Quote