Have Url - need Physical Path

Discussion in 'ASP .Net' started by Johnny Emde, Oct 14, 2005.

  1. Johnny Emde

    Johnny Emde Guest

    Hello

    In a webpage i have 3 img controls. I want to set the ImageUrl ( only if the
    picturefile exist ) else ImageUrl = some default picture.

    To check if the file exists i use File.Exist( Path ) but I only know the Url
    and File.Exists needs the fullpath.

    Can anyone help me.

    /Johnny Jensen
     
    Johnny Emde, Oct 14, 2005
    #1
    1. Advertising

  2. Johnny Emde

    Johnny Emde Guest

    Hey Again

    Found it Server.MapPath( Url ),

    /Johnny Jensen

    "Johnny Emde" <> wrote in message
    news:%...
    > Hello
    >
    > In a webpage i have 3 img controls. I want to set the ImageUrl ( only if
    > the picturefile exist ) else ImageUrl = some default picture.
    >
    > To check if the file exists i use File.Exist( Path ) but I only know the
    > Url and File.Exists needs the fullpath.
    >
    > Can anyone help me.
    >
    > /Johnny Jensen
    >
    >
     
    Johnny Emde, Oct 14, 2005
    #2
    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. Igor
    Replies:
    1
    Views:
    499
  2. =?Utf-8?B?SmVmZiBCZWVt?=

    physical path to virtual path under virtual directory

    =?Utf-8?B?SmVmZiBCZWVt?=, Aug 1, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    1,094
    Eliyahu Goldin
    Aug 1, 2007
  3. marss
    Replies:
    5
    Views:
    1,024
    marss
    Sep 13, 2007
  4. Jeffrey Walton

    How To Convert Physical Path to URL?

    Jeffrey Walton, Dec 9, 2009, in forum: ASP .Net
    Replies:
    2
    Views:
    2,599
    Patrice
    Dec 9, 2009
  5. Scott Tilton

    Convert Physical path to Virtual path?

    Scott Tilton, Jul 11, 2003, in forum: ASP General
    Replies:
    2
    Views:
    641
    Dhananjay Modak
    Jul 11, 2003
Loading...

Share This Page