Thursday, March 22, 2012

Site uploaded for first time. Image pathing issue

I built a site that compiles on my local machine just fine. But when I upload it to the webserver. All the image pathing is geeked up and I don't see the images. I'm using src="http://pics.10026.com/?src=image/jpg.jpg" and I have some images in include files that the include is called via a header -- src="http://pics.10026.com/?src=includes/headerHomeNat.ascx" and the images within it are called via -- <img src="http://pics.10026.com/?src=images/topBannerNAT.jpg"
I have no idea why it would react this way.
Any help is appreciated .

Check the HTML Source of the pages with broke links to see the faulting Urls. A quick and dirty way to get rid of the problem (unless there are some fundamentals regarding virtual and physical paths in your set up that are very different) is to add the runat="server" attribute to all your IMG tags and declare your paths like so:

<imgrunat="server" src="http://pics.10026.com/?src=~/images/topBannerNAT.jpg" />

0 comments:

Post a Comment