Click here to Skip to main content
15,906,463 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i want to create a user profile page just like facebook, in which I want when the user login,user can upload his profile picture.

What I have tried:

i tried this but it is not working.
Storing Images in SQL Server using EF and ASP.NET[^]
Posted
Updated 13-Sep-17 13:55pm

1 solution

Images are stored as byte arrays in database blob fields. So here is a Google Search with Code first & DB first (not knowing which EF approach you are using) solutions: working with blobs in entity framework - Google Search[^]. One of these should suit your requirements.

Update: here is a two-part video tutorial of ASP.NET uploading, Saving, and loading Images to/from DB (from above Google Search):
* part 1 - Save image to database using asp net - YouTube[^]
* Part 2 - Load image from database in asp net - YouTube[^]
 
Share this answer
 
v2

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