最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

ASP.NET on .NET 4 causing IE11 throw _doPostBack is undefined javascript error - Stack Overflow

programmeradmin3浏览0评论

Edit: The site is on Windows Server 2003, hence cannot be upgraded to .NET framework 4.5.

Our web site is serving ASP.NET ON .NET 4. When using IE 11 the auto postback stopped working with the error "_doPostBack is undefined". It's very likely can be fixed with some modification to the browser definition file, which I don't know how yet.

Microsoft suggests feature detection (preferred), or changing the browser definition file. .85%29.aspx

It looks like feature detection means dropping auto postback all together. Isn't that just like rewriting the whole site?

Can someone describe how to accomplish both feature detection and browser definition file modification? Which way is preferred and why.

The accepted answer solved the problem, seems like it's the only way if you are stuck on server 2003. It would be really really nice if someone could explain how feature detection could be done without massive code changes.

Edit: The site is on Windows Server 2003, hence cannot be upgraded to .NET framework 4.5.

Our web site is serving ASP.NET ON .NET 4. When using IE 11 the auto postback stopped working with the error "_doPostBack is undefined". It's very likely can be fixed with some modification to the browser definition file, which I don't know how yet.

Microsoft suggests feature detection (preferred), or changing the browser definition file. http://msdn.microsoft.com/en-us/library/IE/hh869299%28v=vs.85%29.aspx

It looks like feature detection means dropping auto postback all together. Isn't that just like rewriting the whole site?

Can someone describe how to accomplish both feature detection and browser definition file modification? Which way is preferred and why.

The accepted answer solved the problem, seems like it's the only way if you are stuck on server 2003. It would be really really nice if someone could explain how feature detection could be done without massive code changes.

Share Improve this question edited Dec 10, 2013 at 4:19 frogcoder asked Nov 5, 2013 at 7:33 frogcoderfrogcoder 1,0031 gold badge8 silver badges17 bronze badges
Add a comment  | 

4 Answers 4

Reset to default 6

It seems that Windows Server 2003 needs a server-wide solution and all hotfixes didn't work, so it must be done manually.

  1. Edit C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Config\Browsers and add the browser definition in this answer https://stackoverflow.com/a/19203518/1297563
  2. Run c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regbrowsers.exe -i
  3. Restart IIS

Upgrade your .NET Framework to 4.5

Once installed run the command:

aspnet_regbrowsers -i

@FrogCoder

I came across this problem yesterday - and the patch 2836939 solved my issue. Windows 8.1 IE11.

Please consider the following from the Hotfix URL:

"Note If you run the ASP.NET browser registration tool (Aspnet_regbrowsers.exe) after you install the update, the old behavior will return."

http://support.microsoft.com/kb/2836939

Hope this helps.

Place below script in your master page will fix it. i had a similar issue and got fixed.

<script runat="server">

protected override void OnInit(EventArgs e)
{
Page.ClientTarget = "uplevel";
base.OnInit(e);

}
</script> 
发布评论

评论列表(0)

  1. 暂无评论