byte[] Attachmnt;
tbUpload.Text = openFileDialog1.SafeFileName;
FilePath = openFileDialog1.FileName;
if (openFileDialog1.FileName != null)
{
System.IO.FileStream fs = new System.IO.FileStream(FilePath, System.IO.FileMode.Open, System.IO.FileAccess.ReadWrite);
System.IO.BinaryReader binaryReader = new System.IO.BinaryReader(fs);
long byteLength = new System.IO.FileInfo(FilePath).Length;
Attachmnt = binaryReader.ReadBytes((Int32)byteLength);
fs.Close();
fs.Dispose();
binaryReader.Close();
}
public class Document
{
public byte[] DocContent { get; set; }
}
Document objDoc = new Document();
objDoc.DocContent = Attachmnt;
ResumeData_ = objDoc.DocContent;
Submit();
pre>