Effect:
1.
.
.
Database:
Ideas:
Upload: first obtain the word physical address, then judge based on the file type, save it to the corresponding folder, and then insert the path to the database.
Read: First, find the file path in the database based on the input file name, and then read the file according to the path.
Code:
Note: You need to import the COM Library: Microsoft word 11.0 Object Library.
Page_Load( SQLString = ConfigurationManager.ConnectionStrings[ UploadButton_Click( (SqlConnection sqlcon = FullName = FileUpload1.PostedFile.FileName; FileInfo fi = name = fi.Name; type = fi.Extension; (type == || type == SavePath = Server.MapPath(); .FileUpload1.PostedFile.SaveAs(SavePath + + name); sql = + name + + type + + name + SqlCommand cmd = .label1.Text = .tb1.Text = .label1.Text = lbtn_Click( (SqlConnection sqlcon = sql = + tb1.Text.ToString() + SqlCommand cmd = cmd.CommandText = SqlDataReader sdr = ImagePath = ImagePath = sdr[ oMissing = oWord = oWord.Visible = fileName = oDoc = oWord.Documents.Open( oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, oMissing, }