Im having a very strange problem displaying images on a page when Ive employed routing in a webforms site (.net 3.5)
no matter what I try, the image just will not display, heres what Ive tried so far, nothing works
<img alt="" src="images/entertainment-starband.png" border="0"/>
<img alt="" src="../images/entertainment-starband.png" border="0"/>
<img alt="" src="~/images/entertainment-starband.png" border="0"/>
<img alt="" src='<%# ResolveClientUrl("~/images/entertainment-starband.png")%>' border="0"/>
<img alt="" src='<%# ResolveUrl("~/images/entertainment-starband.png")%>' border="0"/>
in my global.asax file Ivbe these setup in the application_start
routes.Add(new Route(@"*\.png", new StopRoutingHandler())); routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute("{resource}.css/{*pathInfo}"); routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" }); RouteTable.Routes.IgnoreRoute("{folder}/{*pathInfo}", new { folder = "images" });
no matter waht, this is the url for the image which results in a 404
http://localhost/Website/allstar-artist-types/images/ukentertainment-starband.png
it should be
http://localhost/Website/images/ukentertainment-starband.png
has anyone else had any problems like this ? I cant figure out whats going on, Ive used similar methods in other places and the image shows ! can anyone help ?