Results 1 to 3 of 3

Thread: will local path as imageurl will show the image in client side

  1. #1
    Hyperactive Member
    Join Date
    May 02
    Location
    fgh
    Posts
    332

    will local path as imageurl will show the image in client side

    Hello

    I have given ImageUrl property as C:\Buttons.gif... this image is display in IIS installed server. But when i access the same page in client machine.. the picture is not displaying

    How can i make available a local path picture to client side machines.

    i dont want to copy the picture to application directory ... is there any away for accessing the picture from any path in the server...

    thankzzzzzzzzz
    gh

  2. #2
    Frenzied Member
    Join Date
    Jan 06
    Posts
    1,827

    Re: will local path as imageurl will show the image in client side

    u have to include this image in project directory and have to use relative path to show image...for example lets say your IIS folder maps to directory Project and if your image is placed in Project\Image folder than u can access image using.... ~Images/Button.gif or you can use server.mappath("Images\Button.gif") to get absolute path.
    __________________
    Rate the posts that helped you

  3. #3
    ASP.NET Moderator mendhak's Avatar
    Join Date
    Feb 02
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,174

    Re: will local path as imageurl will show the image in client side

    Quote Originally Posted by sureshvijayan
    Hello

    I have given ImageUrl property as C:\Buttons.gif... this image is display in IIS installed server. But when i access the same page in client machine.. the picture is not displaying

    How can i make available a local path picture to client side machines.

    i dont want to copy the picture to application directory ... is there any away for accessing the picture from any path in the server...

    thankzzzzzzzzz

    When you use

    <img src="C:\somepath\image.jpg" />

    The browser will look for that image on the client's machine. If this is only on your machine, how can you expect everyone in the world to have that exact same folder structure and image?

    It's for this reason that you need to specify the src as some sort of an HTTP:// location.

    It is, however, possible to create an ASP.NET page that reads the image from your non-virtual directory folder and writes it out using Response.WriteFile().

Posting Permissions

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