IE10下, 调用ajax问题

本文介绍了一个常见的IE10浏览器兼容性问题,即该浏览器导致ASP.NET Ajax控制无法正常工作。通过简单的代码调整,将页面渲染标准设置为IE9,即可解决此问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

ASP.NET

Solution to IE10 Ajax Problem

IE10 is a great leap forward in Internet Explorer history infect it has many fundamental errors. Main problem that web developers face is it breaks all jQuery.Ajax() methods. This includes ASP.NET Ajax controls as ASP.NET Script Resource (ScriptResource.axd) uses jQuery. So now you can understand the depth of the problem. I thought this is a bug in the Beta and release preview and they’ll fix it in final release. But now I’ve got the final release of Internet Explorer 10 with the same problem which Microsoft ignored fixing the problem with Ajax POST requests in it not knowing the same issue breaks their own web forms built using ASP.NET

I searched a solution in the web for this few hours and could not come up with a solution yet. I wonder how Google missed it. Anyway the solution is pretty simple. Here’s what you got to do.

Add this tag between the

1
< head > </ head >

tags.

1
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" >

This should solve your problem at once. We know that IE10 no more supports this. So we render the page in IE9 standards, but keeping the IE10 skin in contols.

Demo: http://sms.gishan.net/

Now close Internet Explorer. Then open IE again and load the page. If you have applied the code correctly, the IE compatibility view button should not be visible, and your website should load AJAX.

Troubleshooting:

Do not use CDATA tags to wrap the above meta tag. Use <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> DOCTYPE
 

Is it the only method?

No. But this is the easiest. In fact the problem is only with AJAX POST method. GET method works fine. Kindly join the discussion by adding your comment below to make the other readers’ life easy.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值