我产生,我用下面的代码片段发送给客户端一个虚拟卡:的Response.Write和UpdatePanel的
Response.AddHeader("Content-Disposition", string.Format("attachment; filename={0}", fileNameOnly));
Response.ContentType = "text/x-vcard";
Response.ContentEncoding = Encoding.GetEncoding("ISO-8859-1");
Response.Write(vCard.ToString());
Response.End();
不过,我需要有内部和的UpdatePanel控件在页面上使用的电子名片。不幸的是,根据Update panel and Response write这不起作用,并导致一个错误。 我想知道什么是一些替代方法发送到客户端的浏览器的Vcard /文件的内容,并让它显示“打开/保存”对话框,不涉及Response.Write?
只有当你做出更新面板取消AJAX更新并充分后孔的页面。其他方法是使用处理程序发送您的x-vcard,这在所有情况下都更好。 – Aristos 2012-04-04 16:04:40