0

I have small issue where I am not able to find solution. My web application in say E folder and I want to locate image to C Folder say C:\Documents and Settings\Administrator\My Documents\My Pictures, How can I do that?

I can't copy those images to my soruce folder, because there are tons of images, and I don't want to double a space.

I tried to find solution, and I got something like this :

<img src="file:///C|/Documents and Settings/Administrator/My Documents/My Pictures/Thomo.jpg" width="600" height="400" alt="" />

This is running fine from Adobe Dreamweaver but its not running in Visual Studio.

Thanks, Hakoo Desai.

3
  • Adding the required path in web.config can be a solution for you. Oct 12, 2012 at 7:12
  • Set the network path map and use it in your app. I believe its just for local testing purpose.
    – Mutant
    Oct 15, 2012 at 3:17
  • Can you give me example for it? Yes, this one only for testing purpose, but in real, Images reside in another folder not in Web Folder. Given path can be recognized but this path is not working in <img> or <asp:image> tag. Oct 15, 2012 at 3:46

1 Answer 1

0

You can add a vitual path in your web application and point it to your C folder.

3
  • I can locate files but not having clue that how can I give this path to ImageURL of <asp:Image> control? Does it able to take that path? I tried but its not working in that way. Oct 15, 2012 at 2:07
  • 1
    refer to technet.microsoft.com/en-us/library/cc771804(v=ws.10).aspx to add virtual path. After you create vitual path(e.g imgpath), in html, you can use this path directly: <img src="imgpath/image.png" /> Oct 15, 2012 at 8:01
  • yeah, adding virtual folder is working, and that's how I solved it, but forgot to update this post. Thanks for your solution. Oct 18, 2012 at 5:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.