Pass a Web Address and return a File System Address

Discussion in 'ASP .Net' started by =?Utf-8?B?QW5nZWw=?=, Sep 20, 2005.

  1. Is there a function that one can pass a web address and return a Windows File
    System Address. In other words, I specify an image at being at the following
    http address:

    /myCommon/images/sample.jpg

    I want it to return where that file is actually located on the pc:

    C:\inetpub\wwwroot\asp_client\MyDir\images\sample.jpg

    Thanks in advance...
     
    =?Utf-8?B?QW5nZWw=?=, Sep 20, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?QW5nZWw=?=

    Landley Guest

    Try this:

    Server.MapPath("/myCommon/images/") & "sample.jpg"

    Landers

    "Angel" <> wrote in message
    news:...
    > Is there a function that one can pass a web address and return a Windows

    File
    > System Address. In other words, I specify an image at being at the

    following
    > http address:
    >
    > /myCommon/images/sample.jpg
    >
    > I want it to return where that file is actually located on the pc:
    >
    > C:\inetpub\wwwroot\asp_client\MyDir\images\sample.jpg
    >
    > Thanks in advance...
     
    Landley, Sep 20, 2005
    #2
    1. Advertising

  3. Use the Server.MapPath method.
    Here's more info:
    http://msdn.microsoft.com/library/d...stemWebHttpServerUtilityClassMapPathTopic.asp

    --
    I hope this helps,
    Steve C. Orr
    MCSD, MVP
    http://Steve.Orr.net



    "Angel" wrote:

    > Is there a function that one can pass a web address and return a Windows File
    > System Address. In other words, I specify an image at being at the following
    > http address:
    >
    > /myCommon/images/sample.jpg
    >
    > I want it to return where that file is actually located on the pc:
    >
    > C:\inetpub\wwwroot\asp_client\MyDir\images\sample.jpg
    >
    > Thanks in advance...
     
    =?Utf-8?B?U3RldmUgQy4gT3Jy?=, Sep 21, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nathan Sokalski
    Replies:
    5
    Views:
    1,079
    Gaurav Vaish \(www.Edujini-Labs.com\)
    Jan 10, 2007
  2. Greenhorn
    Replies:
    15
    Views:
    884
    Keith Thompson
    Mar 6, 2005
  3. blufox
    Replies:
    2
    Views:
    593
  4. Vols
    Replies:
    3
    Views:
    394
    Ian Collins
    Apr 28, 2008
  5. Nathan Sokalski
    Replies:
    4
    Views:
    338
    Nathan Sokalski
    Dec 21, 2006
Loading...

Share This Page