IE工具栏中的“打印"按钮面临问题 [英] facing issue with the print button present in the toolbar of IE

查看:118
本文介绍了IE工具栏中的“打印"按钮面临问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
IE工具栏中的打印"按钮存在问题.
每当我单击打印按钮时,就会调用页面的prerender事件.这仅在IE中发生.当我尝试使用Firefox打印时,不会发生这种情况.
我在first.aspx页面中有一个iframe.在prerender事件处理程序中,我给iframe源代码如下.

iframe1.Attributes ["src"] ="second.aspx"

在second.aspx中,我读取图像文件,转换为字节数组,并按如下所示在first.aspx iframe中显示.

试试
{
response.contenttype("image/jpeg");
response.binarywrite(img);
response.end();
}
catch(ex异常)
{
response.write(加载图像时出错");
}

该图像在Firefox和IE中均能正确显示.但是当我尝试打印它时,我在IE中遇到错误.
另外,在调试模式下运行时,我发现单击打印按钮时,将调用first.aspx的prerender事件(仅在IE中).
你能帮我这个忙吗?非常紧急.
在此先感谢您.

Hi all,
I''m facing issue with the print button present in the toolbar of IE.
Whenever i click the print button, the page''s prerender event is called. This happens only in IE. When i try to print with Firefox, this does not happen.
I have an iframe in first.aspx page. In the prerender event handler, I''m giving the iframe source as follows.

iframe1.Attributes["src"] = "second.aspx"

In second.aspx, i read an image file, convert into byte array and display it in the first.aspx iframe as follows.

try
{
response.contenttype("image/jpeg");
response.binarywrite(img);
response.end();
}
catch(Exception ex)
{
response.write("Error loading the image");
}

The image is displaying properly in both firefox and IE. But when i try to print it, i''m getting error in IE.
Also, when i ran in debug mode, i found that on click of print button, the first.aspx''s prerender event is being called (only in IE).
Can you kindly help me out with this. Its pretty urgent.
Thanks in advance.

推荐答案

我怀疑您可以更改IE,是否可以使IE正常运行,以使代码按原样运行?现在出了什么问题?
I doubt you can change IE, so can you make it so that the code works with it behaving as it is ? What is going wrong right now ?


这篇关于IE工具栏中的“打印"按钮面临问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆