Server.MapPath help

Results 1 to 2 of 2

Thread: Server.MapPath help

  1. #1
    Join Date
    Dec 1969

    Default Server.MapPath help

    Hi,<BR><BR>I am trying to display images that I have stored on my server. The images displayed are dynamic based on the results of a previous search. (e.g. Someone searches for Cats, and they get cats, if they search for dogs, they get dogs.)<BR><BR>When I use the Server.MapPath method, I obtain the Physical Location of the file, but when I try to use this location as the src for the image, I get the broken icon. <BR><BR>Here is an example of the Physical path that I am getting:<BR><BR>FullPath=Server.MapPath("PlejPrevi ews/"&rsInfo("Department")&"/"&rsInfo("Class")&"/"&rsInfo("SubClass")&"/"&rsInfo("ImageName")) <BR><BR>This yields the following:<BR>F:SetsMatrixlitePlejPreviewsBeddingE nsembleComforter Sets5647323_.jpg<BR><BR>As I mentioned, when I try to view a webpage with the previous path as an img src, I get nothing. <BR><BR>Can anyone help?<BR><BR>Thanks.

  2. #2
    Join Date
    Dec 1969

    Default You don't WANT it!

    Server.MapPath is *ONLY* needed for FileSystemObject and the location of .mdb files.<BR><BR>&#060;IMG&#062; tags CAN NOT USE a physical location. They *MUST* use a URL!<BR><BR>Suppose your site is named<BR><BR><BR>Then when you use something like<BR> &#060;IMG SRC="/images/fido.jpg"&#062;<BR>you are *REALLY* using<BR> &#060;IMG SRC="<BR>/images/fido.jpg"&#062;<BR><BR>Go look at some typical web pages with typical &#060;IMG&#062; tags and you&#039;ll see it&#039;s the truth. The very *LAST* thing you want here is Server.MapPath.<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts