hi...to upload image into db..use "Fileupload control"..
..Here is the sample code..
if (FileUpload1.HasFile)
{
try
{
string filename = Path.GetFileName(FileUpload1.FileName);
HttpPostedFile Image = FileUpload1.PostedFile;
byte[] myimage = new byte[FileUpload1.PostedFile.ContentLength];
Image.InputStream.Read(myimage, 0, (int)FileUpload1.PostedFile.ContentLength);
cmd.Parameters.AddWithValue("@Logo", myimage);
lblError.Text = "Upload status: File uploaded!";
}
catch (Exception ex)
{
lblError.Text = "Upload status: The file could not be uploaded. The following error occured: " + ex.Message;
}
..use this code to save image in db..
----cmd.Parameters.AddWithValue("@Logo", myimage);----
is the command..which add the image to db...