C# 文件下载遇到了Ajax
文件下载按钮事件为C# code:
string filePath = "D:\\1.jpg";//路径
FileInfo fileInfo = new FileInfo(filePath);
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.AddHeader("Content-Disposition", "attachment;filename=" + fileInfo.FullName);
Response.AddHeader("Content-Transfer-Encoding", "binary");
Response.Charset = "gb2312";
Response.ContentType = "text/xml";
//Response.Charset = "utf-8";
//Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
Response.WriteFile(fileInfo.FullName);
Response.Flush(); Response.End();
前台里我也放了C# code:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
可是死活都出msxml3.dll: 系统错误: -1072896748。
快疯了,大侠帮帮忙吧
和 ajax 有什么关系?
没有AJAX一切都OK,加了AJAX就这样了
ajax 加在哪了?
加在前台页面了啊~C# code
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com
相关问答:
C#如何判断连接sql server数据库成功?
try
{
connection.connect()
return true;
}
catch()
{
return false;
}
楼主很着急,开了几贴了。
引用
try
{
connection.connect( ......
C#写JAVASCRIPT 数组
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
& ......
C#调用存储过程提示非法变量名。
存储过程代码如下:
create or replace procedure login_in(
p_loginid in varchar2,
p_password in varchar2,
p_admin out varchar2,
p_nam out varchar ......
第一次做wap,写了个简单的,发现不少问题
default.aspx:
<body>
<mobile:Form id="Form1" runat="server">
<mobile:Command ID=& ......
SqlData da = new SqlData();
SqlDataReader read = da.ExceRead("select * from tb_Admin where AdminName='" + this.txtName.Text + "'");
  ......