Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
I'm making a website for store ... in the admin area he inter the product title and description and an image for the product and in the user area in the menu if he choose the name of the product he show all what is the admin inserted .
 
but what should i do , save the image in the databse or just in the server ?
and if i stored it in the serve how can i link it with the description ?
Posted 16-Dec-12 19:58pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Depending on the number of products you have and the size of the disk space available on the server (both web and database server) you need to take this call.
To store and retrieve the images from database, you can go through the following link:
http://www.aspdotnet-suresh.com/2011/01/how-to-insert-images-into-database-and.html[^]
 
If you want to store the image in the web server filesystem, generate a unique name for this file and store the path of this file in the product table along with the product details
For example: If you have a table named Products with the following schema:
Product Id (can be identity or GUID)
Name varchar(255)
ImagePath varchar(255)
 
When displaying the product details, give this path as the source to the image element.
Hope I am clear.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  

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

  Print Answers RSS
0 OriginalGriff 318
1 Richard Deeming 180
2 Sergey Alexandrovich Kryukov 175
3 Yogesh Kumar Tyagi 165
4 ChauhanAjay 156
0 Sergey Alexandrovich Kryukov 6,218
1 OriginalGriff 5,413
2 CPallini 2,473
3 Richard MacCutchan 1,627
4 Abhinav S 1,530


Advertise | Privacy | Mobile
Web01 | 2.8.140814.1 | Last Updated 17 Dec 2012
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