I wrote a series of blog posts awhile back before that demonstrates the following:
- Uploading and Storing Images to Database in ASP.NET
- Displaying Image to Image Control based on User Selection in ASP.NET
- FAQ: Displaying Image from Database to GridView Control
- Uploading and Storing Image Path to Database and Image to Folder - Part 1
- Uploading and Storing Image Path to Database and Image to Folder - Part 2 (Displaying of Images)
- Validate Image extensions upon Upload
In this post I'm going to demonstrate how to upload an image to a specified folder within the root of the web application and display the image right away in the Image control after uploading. To get started let's go ahead and fire up Visual Studio and create a new Website/Web Application project. After that, create a folder under the root application for storing the uploaded images. The folder structure should look something like this below:
Solution
- Application Name
- AppCode
- AppData
- ImageStorage - //we will save the images in this folder
- Default.aspx
- web.config
For the simplicity of this demo, I just set up the HTML form like below:

Join the conversation! Your thoughts help the community grow.