I am trying to store images in sql server with data type image now the problem is getting stored into two rows, i am using FileUpload control to upload image, my code is as follows
byte[] imagedata = ImageUpload.FileBytes;
con.Open();
SqlCommand insertImageCmd = new SqlCommand("insert into Images(ImageName,Image) values (@name, @image)", con);
insertImageCmd.Parameters.AddWithValue("@name", imageNameTextBox.Text);
insertImageCmd.Parameters.AddWithValue("@image", imagedata );
insertImageCmd.ExecuteNonQuery();
con.Close();
is this the correct way store images? please help!