Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Have Url - need Physical Path

Reply
Thread Tools

Have Url - need Physical Path

 
 
Johnny Emde
Guest
Posts: n/a
 
      10-14-2005
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


 
Reply With Quote
 
 
 
 
Johnny Emde
Guest
Posts: n/a
 
      10-14-2005
Hey Again

Found it Server.MapPath( Url ),

/Johnny Jensen

"Johnny Emde" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How To Convert Physical Path to URL? Jeffrey Walton ASP .Net 2 12-09-2009 01:35 PM
How get the virtual path based on the physical path? marss ASP .Net 5 09-13-2007 04:20 PM
physical path to virtual path under virtual directory =?Utf-8?B?SmVmZiBCZWVt?= ASP .Net 4 08-01-2007 02:59 PM
Physical path of a aspx Page at design time? Igor ASP .Net 1 08-15-2003 08:41 AM
Convert Physical path to Virtual path? Scott Tilton ASP General 2 07-11-2003 03:14 PM



Advertisments