I want to send (INSERT) a doc file, e.g resume into a table of my database. What is the code required to perform this in asp.net 3.5?
1 Answer
Convert the posted file into a Byte Stream.
byte[] myByte = new byte[fupUpload.PostedFile.ContentLength];
Stream imgStream = fupUpload.PostedFile.InputStream;
imgStream.Read(myByte, 0, fupUpload.PostedFile.ContentLength);
Then save the myByte stream into the DB using the ADO.NET Model, that you are using in your application.