I manage ajax browser history using asp.net's(v. 4.0) EnableHistory="true"
of the ScriptManager & everything has worked fine till today.
I fire my browser from localhost today and I get this error message in IE 9 (only IE)
Message: Sys.InvalidOperationException: For the history feature to work in IE, the page must have an iFrame element with id '__historyFrame' pointed to a page that gets its title from the 'title' query string parameter and calls Sys.Application._onIFrameLoad() on the parent window. This can be done by setting EnableHistory to true on ScriptManager.
I've undone all modifications I made today, cleared my browser cache+cookies+history+everything and deleted "Temporary ASP.NET Files" both from the Windows and Temp folders but this error wont go away.
Deleting <meta http-equiv="X-UA-Compatible" content="IE=7" />
from my master page however gets rid of the error but its not an option as a lot of styling go开发者_运维技巧es wrong. The meta has been there from the start and everything has worked so my question is why now?
Any pointers to further reset my environment(e.g deleting some hidden files) or some light into what might be going on will be helpfull. Thanx.
The ScriptManager outputs an iframe to make history management work correctly in IE7. In this case, unfortunately, there is a bug. Your browser is IE9, so it figures you don't need the iframe. But your meta tag makes the client-side behave as IE7, so it does need the iframe. It will be fixed in the next rev of .NET. Until then, you should be able to work around the problem by looking at the iframe content that is rendered when you use compat mode, or an actual IE7, and mimicking that in your page. But you need to make sure it doesn't end up in the page twice when it really is IE7, so only output it if you detect IE >= 8. Make sense, I hope? :)
精彩评论