我想把Word内容导入到ASP.NET中进行展示,怎样做呢?请高手帮忙
解决方案 »
- 【求助】如何往DB2数据库中存储二进制流文件
- 写一个简单的分页控件,不知道错在哪里
- 页面来路问题_________________________
- 遇到很奇怪的问题 EnsureEventValidationFieldLoaded() +297
- 求助这个每行虚线要怎么去掉?
- 在ASP.NET(VB) 中如何调用 asp 中的函数。
- 关于ViewState的疑问????
- 取IP的问题
- 关于reapter绑定出错,请大家进来看看!(高分)
- 大家帮我看看这里到底是哪里出错了??急!
- 把Word文档读入到sqlserver中,怎样从库里读出来,然后显示在FreeTextBox中或其他控件中(急)
- 弹出提示了,怎么来刷新父页?
string sql="select st_nr from stid1 where st_id=1";
SqlConnection connection = new SqlConnection("Server=.;uid=sa;pwd=sa;Database=tksqldb_train");
SqlCommand command = new SqlCommand(sql, connection);
connection.Open();
SqlDataReader dr = command.ExecuteReader();
if(dr.Read())
{
Response.Clear();
Response.AddHeader("Content-Type","application/msword");
Response.BinaryWrite((byte[])dr["st_nr"]);
}
dr.Close();
connection.Close();
这个是从数据库binary字段中读出来然后用ie打开的