Author: venkatzeus | Posted on: 4/16/2010 12:14:00 AM | Views : 265

Hi,
I am trying to upload a file to the database using the File Upload control. The database column is of type "text" 
In the Insert command, I tried to retrieve the file and pass, but as it is a byte array, I am not able to save the data.
byte[] imageBytes = new byte[FilesUpload.PostedFile.InputStream.Length + 1]; FilesUpload.PostedFile.InputStream.Read(imageBytes, 0, imageBytes.Length); InsertCommand.Parameters.AddWithValue("@MyFiles", imageBytes);
How to convert the byte array to string?
Thank you
 
...

Go to the complete details ...