Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET image
Dear Experts,
 
I have a doubt in asp.net project, I have a module in my asp.net project which involves Image Uploading...
 
I am confused about storing the image....
 
Which is the best and perfect method to store an Image, Is it store in Database or in a folder..??
 
Which is best..??
 

Thanks and Regards,
 
Dileep
Posted 28-Mar-13 8:05am
dilzz1.2K
Edited 28-Mar-13 8:15am
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

It depends on how many images do you have, how do you classify them. One of the most popular approaches is to give them unique file names and put in some directory on your server side and store just the file names in the database.
 
—SA
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Security wise you can store the pictures in the database .on the other hand, performance wise you can store the pictures in a directory or virtual directory and keep the path at the database
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Storing images in database is not useful, unless you are changing them frequently.
Otherwise, they are more complex to manage and you always need to code for them at server side,
so for keeping things simple you should avoid using them.
 
These links can be of some help,
 
link 1
link 2
  Permalink  
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 319
1 Maciej Los 295
2 Sergey Alexandrovich Kryukov 230
3 CPallini 205
4 Sinisa Hajnal 166
0 OriginalGriff 7,760
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,785


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 28 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100