ASP.NET Web窗体 - 按钮里面没有&LT工作; IFRAME>在IE9及以下 [英] ASP.NET Web Forms - Button not working inside <iframe> in IE9 and below

查看:88
本文介绍了ASP.NET Web窗体 - 按钮里面没有&LT工作; IFRAME>在IE9及以下的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有了一种形式,它的一个ASP.NET Web窗体页,我加载它在< IFRAME方式> 作为一个弹出

I have an ASP.NET Web Forms page that has a form in it and I load it in an <iframe> as a popup.

在所有现代浏览器它的伟大工程。

In all modern browsers it works great.

在IE9及以下,然而,事情奇怪。

In IE9 and below, however, things are weird.

一个文件输入元素在它的浏览按钮,点击时无法打开文件选择对话框。

One file input element failed to open the file selection dialog when clicking on its browse button.

解决这个(用JS伎俩)之后,我看到了另一个问题。在窗体中的另一个按钮与此属性回发:

After fixing this (with a JS trick), I saw another problem. Another button inside the form with this attribute for postback:

onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("btnUpload", "", true, "", "", false, false))"

..未能后面调用code。

..failed to invoke the code behind.

在页面加载时,它击中我的OnLoad()在服务器上的方法。

When the page loads, it hits my OnLoad() method on the server.

我已经找遍了整个网络试图找到一个解决方案,我已经看到有iframe内JS别人的问题,但似乎没有什么帮助。
没有任何人有任何想法可能是错在这里?
这显然​​是一个IE9的问题,但我怎么能解决呢?

I have searched the whole web trying to find a solution and I have seen others having JS problems inside iframes, but nothing seemed to help. Does anyone have any idea what may be wrong here? This is clearly an IE9 problem, but how can I solve it?

更新:
试了几次后,我得到的形式在后拒绝访问,虽然我不应该(这是同一个域和访问应该而且是允许的)。

UPDATE: After a few tries, I get an "Access Denied" during the form post, while I shouldn't (It is on the same domain and access should and is allowed).

UPDATE2:我已搜查绕X-FRAME-OPTION的东西:<一href=\"http://stackoverflow.com/questions/19089548/x-frame-option-sameorigin-and-clickjacking-in-asp-net\">x-frame-option SAMEORIGIN并在ASP.NET 点击劫持,但这样做我的的Application_BeginRequest 似乎并没有帮助:

UPDATE2: I have searched stuff about X-FRAME-OPTION : x-frame-option SAMEORIGIN and clickjacking in ASP.NET but doing this in my Application_BeginRequest doesn't seem to help:

HttpContext.Current.Response.AddHeader("x-frame-options", "SAMEORIGIN");

相关问题:
得到错误的网页浏览IE中被拒绝

UPDATE3:确定。拒绝的访问是因为我发送点击被JS文件输入。 IE不喜欢它。浏览按钮的奥秘不工作的遗体。也许这是一个Telerik的暴露出的问题$ P $垫ASP.NET控件:的http://www.telerik.com/forums/browse-button-doesnot-workin-ie8#rGGhp26Lm02afXkJNMwQ3g

UPDATE3: OK. The access denied is because I send the click to the file input by JS. IE doesn't like it. The mystery of the Browse button not working remains. Perhaps it is a Telerik problem spread to ASP.NET controls: http://www.telerik.com/forums/browse-button-doesnot-workin-ie8#rGGhp26Lm02afXkJNMwQ3g

推荐答案

确定。我终于用,而不是正常上传ASP.NET控件RadUpload解决了这一之一。

OK. I have finally solved this one by using the RadUpload instead of the normal Upload ASP.NET control.

这篇关于ASP.NET Web窗体 - 按钮里面没有&LT工作; IFRAME&GT;在IE9及以下的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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