I’m building a site(asp.net) that needs save images for each product, so I’m not sure how implement it. I think i can do it saving all photos in the same folder but i do not like that i would prefer to create a new subfolder for each product and save the images in that subfolder but maybe in the future i have problems due to limitations with number of folders or subfolders.
Do you think that second option (creating subfolders) is better and secure?
You can see in the following link the limits of windows file system
http://technet.microsoft.com/en-gb/library/bb457112.aspx
taken from
https://serverfault.com/questions/18692/what-is-the-maximum-number-of-files-or-folders-that-can-be-stored-in-a-single
the limits of files and sub folders changed depending the kind of server/netapp.
you can read in the link above the limits for each one.
I would use subfolders but it is up to you, the important thing is that you need to know the limits and then decide.