How to Insert images into SQL Server from ASP.NET Using C#

Here I will explain how to insert images into database into binary form using
First we create image table in our database.

After creating table, table desing should be like this

Now,  design your  aspx page like this

After that add System.Configuration namespace in code behind because in this namespace contains classes representing connection information with sql. We already explain, how to create connection string in our web site. For details click here!

After that add following code in code behind 

At Last, we have compile our aspx page on local host and insert image . After inserting our table structure like this

We hope this will help you......If you enjoyed this post, please like this blog!


  1. Thanks for this article. Really helpful for me..
    Waiting for more post..