user534637
user534637

Reputation: 11

how to refer images from the folder "c:\images" for setting src to img tag

i want to access the images from the system folders like (c:\,D:) for setting these images to the img src attribute. is it possible? how can it be achieved in asp.net?

Upvotes: 1

Views: 1089

Answers (3)

Rosmarine Popcorn
Rosmarine Popcorn

Reputation: 10967

If you need Remote Browser to have access at you're Local Drives or anywhere into the Harddrive than you should use SymLinks or HardLinks which can be created with the MLINK Command this is a how To

Because if you're ASP Application is located somwhere inside the C:// it can access only it's root dir and root sub dir's.

So just create a SymLink or HardLink from C:\images to you're ASP root directory .

Upvotes: 0

C0L.PAN1C
C0L.PAN1C

Reputation: 12243

    <img src="file:///c:/images/sample.jpg">

Upvotes: 0

Marc B
Marc B

Reputation: 360682

Such local paths would only work for browsers on the same machine. They will NOT work for remote browsers, as those browsers will be attempting to access their OWN local drive, not your machine's.

But basically, simply use your browser to "surf" to the directory on your machine you want, then cut 'n paste the url bar. Just enter C:\ or D:\ as your starting location in the address bar.

Upvotes: 3

Related Questions