Click here to Skip to main content
15,894,907 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
how to insert image in database in html and asp 


What I have tried:

how to insert image in database in html and asp
Posted
Updated 12-May-17 17:29pm
Comments
njammy 12-May-17 16:47pm    
Do you want to insert the image binary raw data? or the file path of the image file?

1 solution

If you are using SQL Server for storing data, you can choose VARBINARY(MAX) data type to store image data. If you don't want your database to be over-weight, you can also think about one of the most common process of saving data in FTP/Application folder and then while retrieving you can point he path to the respective folder path.

Check following articles and choose which best suits you-
Save and Retrieve images from database in ASP.Net[^]
Retrieve images using a file path stored in database in ASP.Net[^]
How to upload,save image in folder and path in SQL server database and retrieve using Asp.net C#, VB? ~ Asp.Net,C#.Net,VB.Net,MVC,jQuery,JavaScipt,AJAX,WCF,Sql Server example[^]

Hope, these helps :)
In case of any difficulties, please let me know.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900