0

Hello,

I have a page where i can upload files. so when i upload a file with .odt extension it should convert those files to word document files.. so can any help me..

Thank you.

protected void btnUpdate_Click(object sender, EventArgs e)
    {
string destination = Server.MapPath("~/Documents" + "\\" + name + "\\" + date);
string dpath;
if (FileUpload1.HasFile)
        {
            string fn = System.IO.Path.GetFileName(FileUpload1.FileName);
            string extension = Path.GetExtension(FileUpload1.FileName);

            if ((extension == ".doc") || (extension == ".odt"))
            {
                 dpath = destination ;
                 FileUpload1.SaveAs(dpath + "\\" + fn);
            }
         }
}
2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by harishbansal90
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.