Hi,

when i set Image1.ImageUrl = "C:\Sunset.jpg"; not working means it is not displaying the image on the webpage.
My requirement is not to display image on the webpage from where project folder exists.
My requirement is to display image from "C:\" but it is not working....

Please give me any clue?

-Swathi

Permissions.

Website visitors shouldn't have access to view resources in the root directory of drive C. It's a really really bad idea :-o

To store your images outside the project / web root folder, you could try creating a subfolder somewhere, say C:\myimages\, and assign it security permissions to match those of your web root.

You may also find Server.MapPath() function useful for mapping to the physical directory.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.