Jump to content

Displaying image from disc


betul
 Share

Recommended Posts

Hi everyone, I have a photo upload form and I upload photos to disc D to prevent insufficient space problem. While uploading, following code stores the image under D;

img.Save(System.Configuration.ConfigurationSettings.AppSettings["Server"].ToString() + filename); in web.config;<add key="Server" value="D:/Photos/"/> 

but when I try to read the image with the code below, image is not displayed;

imgDetail.ImageUrl = System.Configuration.ConfigurationSettings.AppSettings["Server"].ToString() + red["PhotoName"].ToString();

Now, on aspx page I try ;

 <img src="D:\Photos\3000.jpg" runat="server"/>

and in design mode I am able to see the image but when I run the project, the image is not displayed again. Any sugession is appreciated.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...