how to insert image in sql server 2008 in .net?
i am using below code
string str;
FileUpload img = (FileUpload)imgUpload;
Byte[] imgByte = null;
if (img.HasFile && img.PostedFile != null)
{
HttpPostedFile File = imgUpload.PostedFile;
imgByte = new Byte[File.ContentLength];
File.InputStream.Read(imgByte, 0, File.ContentLength);
}
str ="Insert into tblimg values ('"+imgByte.tostring()+"')";
it's not working