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);
}
}
}