|
-
Jun 9th, 2008, 10:07 AM
#1
Thread Starter
Hyperactive Member
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
-
Jun 9th, 2008, 10:18 AM
#2
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 
-
Jun 9th, 2008, 01:46 PM
#3
Re: will local path as imageurl will show the image in client side
 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|