locked
Asp.Net Paging Controls do not work on IE10 RRS feed

  • Question

  • I am running IE10 RTM on Windows 8 Pro RTM from MSDN.

    The built in paging controls of a gridview are not working on IE10, they work fine on all other versions. How can this be?

    Go to this website and try to click on one of the numbers in the grid footer, nothing happens in IE10. Run in compatibility and it works fine. Asp.net generates this code, how can Microsoft not support the millions of instance of their own code? IE9 was great and Ie10 is barely usuable.

    http://www.mywarhistory.com/browse/browse.aspx

    Monday, September 3, 2012 1:37 PM

Answers

  • Hi,

    Update your server/website with the latest version of .net. The version you are using does not recognise the IE10 UAS.

    to debug your websites press f12>Script tab, click "Start Debugging"


    SCRIPT5009: 'WebForm_GetElementByTagName' is undefined

    browse.aspx, line 682 character 5

    use Tools>Choose User Agent String and change the UAS to IE9 and the above error message disappears indicating that the version of .net you are using on your server is using UAS sniffing.

    or

    possibly there is changed behavior with oncontextmenu in IE10.... test by removing your copyright notice from the contextmenu handler

    for questions about html, css and scripting post to the IE Web Development forum.

    Rob^_^



    Monday, September 3, 2012 7:22 PM
  • I upgraded my website from .Net 3.5 to .Net 4.0. I published my website to the server and changed the application pool to .Net 4.0. The website now works in IE10.
    Sunday, September 9, 2012 5:52 PM

All replies

  • Hi,

    Update your server/website with the latest version of .net. The version you are using does not recognise the IE10 UAS.

    to debug your websites press f12>Script tab, click "Start Debugging"


    SCRIPT5009: 'WebForm_GetElementByTagName' is undefined

    browse.aspx, line 682 character 5

    use Tools>Choose User Agent String and change the UAS to IE9 and the above error message disappears indicating that the version of .net you are using on your server is using UAS sniffing.

    or

    possibly there is changed behavior with oncontextmenu in IE10.... test by removing your copyright notice from the contextmenu handler

    for questions about html, css and scripting post to the IE Web Development forum.

    Rob^_^



    Monday, September 3, 2012 7:22 PM
  • Tuesday, September 4, 2012 7:46 AM
  • I am running .Net 2.0-4.0 on my server. My code base is .net 3.5. Are you saying I need to install .net 4.5 even though none of my code in in 4.5? I do not understand how that would change anything?

    Wednesday, September 5, 2012 1:04 PM
  • Have a look at your server error logs.... you must be receiving some with the code and server configurations you have.... .net is backwards compatible NOT forwards compatible. Run a windows update on your server to update the .net version

    my testing (using the IE10 UAS in IE9) reproduces the issue and error message above which indicates that the version of .net you are using on the server is using UAS sniffing and does not recognise the IE10 UAS... you may be using a browser.caps file and only need to add the logic for the IE10 UAS.... but certainly you must have other issues (see your server error logs) with the configuration of your code and server .net versions.... probably the .net version you have assigned to application pooling as this is where system scripts are served (for postback js on the client).

    I would run a windows update on your server and update IIS to use .net 3.5, the same as your development environment.


    Rob^_^

    Wednesday, September 5, 2012 8:44 PM
  • My website is running .net 3.5 which is Classic .NET AppPool 2.0. I do have .net 4.0 and 4.5 installed on the server but this website is not using them. I cannot run windows update because its a VM. I reviewed my Application Server Logs and no errors are in it. I am just using basic .net, I am not using any browser.caps file.
    Thursday, September 6, 2012 1:10 AM
  • No... your server is using asp.net 2.0

    <tt>HTTP/1.1 200 OK
    Cache-Control: private
    Content-Length:
    31012
    Content-Type: text/html; charset=utf-8
    Server:
    Microsoft-IIS/7.0
    X-AspNet-Version: 2.0.50727
    X-Powered-By:
    ASP.NET
    Date: Thu, 06 Sep 2012 04:13:55 GMT
    Connection: close</tt>

    you have compiled your website targeting the 3.5 version.... Configure your website (in IIS7) to use the same version as you used in your development environment.

    and/or

    <tt>contact your hosting provider....there is some middlewhere on their side that is not recognising the IE10 userAgent string (UAS)</tt>

    <tt>or </tt>

    (at a guess).... are you using a touch enabled device? Comment out the document.click event handler...

        <script language="JavaScript" type="text/javascript">
        //<![CDATA[
            var message="2008-2011 MyWarHistory.com, ltd - All Rights Reserved"; 
    
            function click(e) {
                if (document.all) {
                    if (event.button == 2) {
                        alert(message);
                        return false;
                    }
                    }
                    if (document.layers) {
                    if (e.which == 3) {
                        alert(message);
                        return false;
                    }
                    }
            }
            if (document.layers) {
                document.captureEvents(Event.MOUSEDOWN);
            }
            document.onmousedown=click;
        //]]>
        </script> 
    

    although the above is a longshot (I can reproduce the issue in IE9 when using the IE10 UAS....suggesting that mspointer event handling is not the issue)

    the common design pattern is to use the body oncontextmenu event handler i/o the document.onclick event handler (works in all browsers except Opera...but I think Opera now accepts it).... although in IE10 mspointer replaces all mouse click events...

    it is pretty old hat to use an event handler to prevent users or visitors from viewing your source markup... a determined user will find a way (as I have ).

    but my best guess is that the 2.0 version of .net that you are using in IIS on your site needs to be changed to the same version as you developed with...

    the error message

    SCRIPT5009: 'WebForm_GetElementByTagName' is undefined

    browse.aspx, line 682 character 5

    suggests that when the IE10 UAS is encountered on your server, it is not recognised and .net does not return the correct system script resources that has the WebForm_GetElementByTagName function...

    on your side.....

    open your site test page in IE10. then f12>Document Mode IE9 .... refresh the page to resend the request... then

    type

    javascript:alert(navigator.userAgent);

    in the IE Address bar....

    I expect that you will see the IE9 userAgent string.

    the only conclusion I can draw is that the version of .net on your server does not recognise the IE10 UAS...

    I haven't used 2.0 in years, but in all my testing of IE7 to 10 I haven't encountered problems with .net not recognising an IE UAS... as far as I thought, there was no UAS sniffing in the versions of .net at all. but that may be because I was not using v2.

    there have been similar questions to yours (IE10 and old versions of .net/DotNetNuke) in the IE Web Development forum. the pattern that is emerging to me is that v2 apparently uses UAS sniffing...


    Rob^_^

    Thursday, September 6, 2012 4:48 AM
  • I will look into your suggestions but I want to point out that there is no .Net 3.0 or 3.5 when it comes to app pools. .Net 3.0 and 3.5 are just an extension of .Net 2.0 so that is why you see it as .Net 2.0, my server is configured properly otherwise my code would not work at all. The problem is that IE10 does not recognize Microsoft self generated code which is not logical. I will do a thorough review this weekend of the code.
    Thursday, September 6, 2012 11:51 AM
  • I upgraded my website from .Net 3.5 to .Net 4.0. I published my website to the server and changed the application pool to .Net 4.0. The website now works in IE10.
    Sunday, September 9, 2012 5:52 PM
  • I did and I am using IE 11 and I can click on the numbers to navigate to next page. No issues here
    Friday, May 9, 2014 4:09 AM