I’m developing an ASP.NET app (C#) that connect to SQL Server 2008 using ADO.NET entity framework.
The user of this app can select an image from his local hard drive to insert in SQL Server. How can I do this?
I know how to store the image into SQL Server but I don’t know how to upload the image to the server (using FileUpload server control?).
Thank you!
For storing uploaded file to SQL server you can look at this answer of mine :
How do you store a picture in an image column?
In this example, uploadInput is a file input control, you can use it as FileUpload control in ASP.NET.
For using File upload Control in ASP.NET here is a good MSDN article.