Refer last part of this code
int fileSize = fpControl.PostedFile.ContentLength;
Stream fs = fpControl.PostedFile.InputStream;
BinaryReader br = new BinaryReader(fs);
Byte[] bytes = br.ReadBytes((Int32)fs.Length);
//Create array and read the file into it
//fpControl.PostedFile.InputStream.Read(bytes, 0, fileSize);
UploadProofPage oUploadProofPage = new UploadProofPage();
oUploadProofPage.UPLOAD_IdProof = bytes;
oUploadProofPage.UploadId = UploadID;
oUploadProofPage.FileName = fileName;
oUploadProofPage.ContentType = documentType;
if (oUploadProofPage.UpdateFilePosted())
http://sandeepmhatre.blogspot.com/2012/12/dynamic-file-upload-in-dynamic-gridview_16.html Sandeep M,
Software Developer
Follow me on :
http://sandeepmhatre.blogspot.in
Anishabathija, if this helps please login to Mark As Answer. | Alert Moderator