Click here to Skip to main content
15,883,705 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
con.Open();
cmd = new SqlCommand("insert into picture(pic)" + "values(@pic)", con);
cmd.CommandType = CommandType.Text;
SqlParameter pic1 = new SqlParameter("@pic", SqlDbType.Image, imageSize.Length);
pic1.Value = imageSize;
cmd.Parameters.Add(pic1);
con.close();


From the above code it is inserting into database but not displaying in Image Control.

How do I display the image in an Image Control?
Posted
Updated 9-Nov-11 23:12pm
v2

 
Share this answer
 
 
Share this answer
 
go through the below CP link

C# Save and Load Image from Database[^]
 
Share this answer
 
how to brwse in button and textbx in load fullpath and insert image in SQl database by ?
 
Share this answer
 
Comments
Richard C Bishop 7-Oct-13 12:26pm    
Why did you ask a question as a solution to someone elses question?

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