0
Reply

To enter pdf and docx file in the database

Ankita Singhwal

Ankita Singhwal

May 16 2013 10:00 AM
940
 try
        {
            oCommonBLL.Extension = Path.GetExtension(FileResume.FileName);
            if (oCommonBLL.Extension == ".doc" || oCommonBLL.Extension == ".docx" || oCommonBLL.Extension == ".pdf")
            {
                int fileSize = FileResume.PostedFile.ContentLength;
                byte[] documentBinary = new byte[fileSize];
                FileResume.PostedFile.InputStream.Read(documentBinary, 0, fileSize);
                oCommonBLL.byResume = documentBinary;
            }
        }
        catch (Exception ex)
        {
            ErrHandler.WriteError("Class:" + this.ToString() + " Method : " + System.Reflection.MethodBase.GetCurrentMethod().Name + "Error MSG :" + ex.Message);
        }

it is not giving correct output