if (FileUpload1.FileName != "") { string filePath = Server.MapPath("~/pp/") + FileUpload1.FileName; string ext = Path.GetExtension(FileUpload1.FileName); switch (ext) { case ".doc": contenttype = "application/vnd.ms-word"; break; case ".docx": contenttype = "application/vnd.ms-word"; break; } FileUpload1.SaveAs(filePath); StreamReader myFile = new System.IO.StreamReader(filePath); myString = myFile.ReadToEnd(); myFile.Close();
Varchar
varbinary
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)