javascript - doPostback failing in IE 11+ Windows 8.1 -
i getting blank page in ie 11 in windows 8.1 preview.after inspecting page assumed following code might culprit,since after these line there not further line displayed debugger window, code breaking after line.
ie 11
<!-- <form name="aspnetform" method="post" action="register" id="aspnetform"> <input type="hidden" name="__viewstate" id="__viewstate" value="/wepdwukmtkwndq3o
i tried same page in chrome version 29.0.1547.57 m in windows 8.1 preview working fine there , following code.
chrome
<script type="text/javascript"> //<![cdata[ var theform = document.forms['aspnetform']; if (!theform) { theform = document.aspnetform; } function __dopostback(eventtarget, eventargument) { if (!theform.onsubmit || (theform.onsubmit() != false)) { theform.__eventtarget.value = eventtarget; theform.__eventargument.value = eventargument; theform.submit(); } } //]]> </script>
-->
its you're tripping on issue browser detection on iis. scott hanselman wrote in past ie10, , problem you're having appear mirror description.
a hotfix available @ time, http://support.microsoft.com/kb/2600088, stated:
by default, asp.net uses sniffing technology user agent string detect browsers. browser definition files cover range of browser versions. however, version numbers increase, asp.net might not recognize new versions of browser using user agent string. in case, asp.net might handle these versions unknown browser. example, asp.net cannot recognize windows internet explorer 10 has following user agent string:
mozilla/5.0 (compatible; msie 10.0; windows nt 6.1; trident/6.0)
however, hotfix appears not apply ie11 due new format of user agent. there nuget package named app_browsers may contain fix, until have write own rule.
msdn browser definition file schema gives details on how write browser detection file; find existing files in c:\windows\microsoft.net\framework\v4.0.30319\config\browsers.
according msdn compatibilty changes in ie11 preview, user agent ie11 in preview is:
mozilla/5.0 (windows nt 6.3; trident/7.0; rv:11.0) gecko
which not recognised standard ie regex (hence problem you're seeing), following should work instead:
trident\/7.0; rv:(?'version'(?'major'\d+)(\.(?'minor'\d+)?)(?'letters'\w*))(?'extra'[^)]*)
i've not tested in live environment, parse major , minor version correctly, key solving original problem - try adding match in file ie.browser
.
note a similar question asked on msdn recently - may worthwhile following , contributing that.
Comments
Post a Comment