You can store file either in BLOB format or in directory, to show word document in ASP.NET you need to use Response object
see below snippet
public static void databaseFilePut(string varFilePath) {
byte[] file;
using (var stream = new FileStream(varFilePath, FileMode.Open, FileAccess.Read)) {
using (var reader = new BinaryReader(stream)) {
file = reader.ReadBytes((int) stream.Length);
}
}
using (var varConnection = Locale.sqlConnectOneTime(Locale.sqlDataConnectionDetails))
using (var sqlWrite = new SqlCommand("INSERT INTO TABLE1(COL1) Values(@File)", varConnection)) {
sqlWrite.Parameters.Add("@File", SqlDbType.VarBinary, file.Length).Value = file;
sqlWrite.ExecuteNonQuery();
}
}
Here the column datatype should be
VARBINARY(MAX)
IFRAME is a nice control to show word file in browser, Or if you don't want your file to get edit you can save it as HTML and the show it