The site I'm working on is done in Classic ASP, and I'm trying to do it as best as possible. I've abstracted it out into a Rails-like directory structure:
app_name - app - includes - helpers - lib - partials - public - stylesheets - images - javascripts
I've created some Rails-like helpers, for example:
Function ImageTag(ByVal imageFileName, ByVal altText)
path = Server.MapPath(IMAGE_ROOT & imageFileName & ".jpg")
ImageTag = "<img src=""" & path & """ title=""" & altText & """ alt=""" & altText & """ />"
End Function
Which is used thusly:
<%= ImageTag("my_pic") %>
With "IMAGE_ROOT" defined as "../public/images/" in a config file. I'm doing development on XP so the site is set as a virtual directory. However, the image won't load on the webpage at all. It's displaying the right path to it, because I can copy/paste it into my browser and view the image - it just won't display on the page for some reason. The same thing goes for my CSS stylesheet - the path is right but the page isn't rendering it at all.
Any suggestions?