try to use a different extension like ".tyt" or use
Response.ContentType = "application/octet-stream";
and send the string in bytes
Response.ContentType = "application/octet-stream";
and send the string in bytes
解决方案 »
- 求问如何 把gridview 还有页面中其他静态的HTML表格 导出到EXCEL表格中
- 怎么实现类似QQ空间,百度空间的模块可拖动效果 ?
- 通过某一节点名称展开其父节点
- 数据表的问题
- 这个月的最后 25 分。希望 能 解决 问题。。。。。。。。。。。。。。马上给分。。。
- .NET中如何取得服务器的IP地址
- 这样才能更新datagrid的绑定数据 同时不刷新页面
- 把sessionstate的mode设为stateserver时发生错误,请帮我看看怎么回事~~
- 如何通过MailMessage类象需要用户名密码的邮件服务器发送邮件?
- textbox.Text的问题?
- 为什么我的datagrid的不到焦点啊,谢谢
- 如何自动发邮件到固定信箱?
Page.Response.Buffer=true;
Page.Response.Clear();
Page.Response.ContentType="Application/unknown";
Response.AddHeader("Content-Disposition","attachment; filename=" +
ds.Tables[0].Rows[0]["filename"].ToString() + ";");
Page.Response.BinaryWrite(file);
Page.Response.Flush();
Page.Response.End();
我找到原因了,谢谢你的提示。我会给分的