Incorrectly generated "LINK rel Telerik.Web.UI.WebResource.axd"

5 posts, 0 answers
  1. Arkadiusz
    Arkadiusz avatar
    7 posts
    Member since:
    Oct 2010

    Posted 15 Oct 2010 Link to this post

    Hi all,

    In some situations when AJAX calls are triggered for Telerik controls the WebResource reference tag is not generated correctly. In my case it the invalid rel link triggers the IE security warning.

    For code (this is sample, if necessary more details can be posted later)
    <telerik:RadScriptBlock ID="c_radsb1" runat="server">
        <script type="text/javascript">          
             
                function <%=Me.ClientID %>RowContextMenuContacts(sender, eventArgs) {
                               var menu = $find('<%= c_rcmContact.ClientID %>');
                    var evt = eventArgs.get_domEvent();
                     
                    if (evt.target.tagName == 'INPUT' || evt.target.tagName == 'A') {
                        return;
                    }
                     
                    var index = eventArgs.get_itemIndexHierarchical();
                    
                    document.getElementById('EntityContactsRadGridClickedRowIndex').value = index;
     
                    sender.get_masterTableView().selectItem(sender.get_masterTableView().get_dataItems()[index].get_element(), true);
                     
                    document.getElementById('GoogleMapIt').href = 'http://maps.google.com/maps?q=' + sender.get_masterTableView().get_dataItems()[index].get_element().childNodes(3).innerText;
                    menu.show(evt);
     
                    evt.cancelBubble = true;
                    evt.returnValue = false;
     
                    if (evt.stopPropagation) {
                        evt.stopPropagation();
                        evt.preventDefault();
                    }
                }
        </script>
    </telerik:RadScriptBlock>

    following rel link is generated:

    <LINK rel=stylesheet type=text/css href="/IAS/Telerik.Web.UI.WebResource.axd?compress=1&_TSM_CombinedScripts_=%3b%3bTelerik.Web.UI%2c+Version%3d2010.1.415.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a1c53f111-a7b9-466f-ae26-3bd14c91dc5a%3a45085116%3a8efaf5d2%3a92753c09%3a605d48d6%3a8cee9284%3a5c0abcde%3ab241f632%3a121ed8d2%3a5951aeec%3a9cd26499%3a91f742eb%3a1f65231b%3a7f7626a2%3aed2942d4%3ac5d7b491%3aefe88710%3a9e1572d6%3a53e1db5a%3aa8b03562%3a969c664c%3aaac1aeb7%3a51352d27%3a1c2121e%3a8b77daa8%3ae24b8e95"><LINK rel=stylesheet href="           \r\n        \r\n            function ctl00_RootContent_EntityOverview1_ucEntityContactsSubRowContextMenuContacts(sender"><LINK rel=stylesheet href=" eventArgs) {\r\n                           var menu = $find(\ctl00_RootContent_EntityOverview1_ucEntityContactsSub_c_rcmContact\);\r\n                var evt = eventArgs.get_domEvent();\r\n                \r\n                if (evt.target.tagName == \INPUT\ || evt.target.tagName == \A\) {\r\n                    return;\r\n                }\r\n                \r\n                var index = eventArgs.get_itemIndexHierarchical();\r\n               \r\n                document.getElementById(\EntityContactsRadGridClickedRowIndex\).value = index;\r\n\r\n                sender.get_masterTableView().selectItem(sender.get_masterTableView().get_dataItems()[index"><LINK rel=stylesheet href="\r\n            var sUrl = parent.document.URL;\r\n            var sQueryString = sUrl.substring(sUrl.indexOf(\u0027?\u0027)"><LINK rel=stylesheet href=" sUrl.length);\r\n\r\n\r\n            function ctl00_RootContent_EntityOverview1_ucDocumentsRefreshDocuments() {\r\n                var ajaxManager = ctl00_RadAjaxManager1;       \r\n               ajaxManager.ajaxRequestWithTarget(\u0027ctl00$RootContent$EntityOverview1$ucDocuments$hd_btnDoc\u0027"><LINK rel=stylesheet href=" \u0027\u0027);\r\n                return false;\r\n            }    \r\n            \r\n                      \r\n            function ctl00_RootContent_EntityOverview1_ucDocumentsAddDocumentPopup() {\r\n                var oWnd = $find(\ctl00_RootContent_EntityOverview1_ucDocuments_RWAddDocuments\);                 \r\n                oWnd.setUrl(\u0027../CustomDialog/AddDocument.aspx\u0027 + sQueryString); \r\n                oWnd.show(); \r\n                oWnd.add_close(ctl00_RootContent_EntityOverview1_ucDocumentsRefreshDocuments);              \r\n            }   \r\n           \r\n                      \r\n            \r\n//            function RaiseCommand(sender"><LINK rel=stylesheet href=" args)\r\n//            {\r\n//                var result = String.format(\CommandName: {0}"><LINK rel=stylesheet href=" CommandArgument: {1}\"><LINK rel=stylesheet href=" args.get_commandName()"><LINK rel=stylesheet href=" args.get_commandArgument());                \r\n//                alert(result);\r\n//            }\r\n            \r\n            function ctl00_RootContent_EntityOverview1_ucDocumentsRowContextMenuDocuments(sender"><LINK rel=stylesheet href=" eventArgs) {\r\n                var menu = $find(\ctl00_RootContent_EntityOverview1_ucDocuments_c_rcmDocument\);\r\n                var evt = eventArgs.get_domEvent();\r\n\r\n                if (evt.target.tagName == \INPUT\ || evt.target.tagName == \A\) {\r\n                    return;\r\n                }\r\n\r\n                var index = eventArgs.get_itemIndexHierarchical();\r\n                document.getElementById(\radGridClickedRowIndex\).value = index;\r\n\r\n                sender.get_masterTableView().selectItem(sender.get_masterTableView().get_dataItems()[index"><LINK class=Telerik_stylesheet rel=stylesheet type=text/css href="/IAS/WebResource.axd?d=uGoXWPsFGfOIlspQ77Mm5c_f3eccG5dhm5ln6ldYqdmo42i3psBds0WakDc8JpnF0&t=634223939882134812"><LINK class=Telerik_stylesheet rel=stylesheet type=text/css href="/IAS/WebResource.axd?d=uGoXWPsFGfOIlspQ77Mm5c_f3eccG5dhm5ln6ldYqdkZk7LHlOP1UPsK270jAWiJwRpnTdmvBh62wxwwsJj65X0bFxtezqBJanvZd_Kx6KQ1&t=634223939882134812"><LINK class=Telerik_stylesheet rel=stylesheet type=text/css href="/IAS/WebResource.axd?d=uGoXWPsFGfOIlspQ77Mm5c_f3eccG5dhm5ln6ldYqdk8tv8jmN7ejc9VNPPCx4_Ogn1rEctzkWiPSoR7l4V_IQ2&t=634223939882134812"><LINK class=Telerik_stylesheet rel=stylesheet type=text/css href="/IAS/WebResource.axd?d=uGoXWPsFGfOIlspQ77Mm5c_f3eccG5dhm5ln6ldYqdkZk7LHlOP1UPsK270jAWiJxQvznCmaPvGnUiVT839lVD2tlsmZybmhc_Ny2qv-6tU1&t=634223939882134812"><LINK class=Telerik_stylesheet rel=stylesheet type=text/css href="/IAS/WebResource.axd?d=uGoXWPsFGfOIlspQ77Mm5c_f3eccG5dhm5ln6ldYqdljdHS3gswupmmoD3M8nyVjdomFp5gYiBui185r4j1gtMwWvl3lvGFrxPEbMPJLQNY1&t=634223939882134812">

    Attached screen shots shows that IE8 stops processing the AJAX calls on
    .../IAS/SupplyChain/args)/r/n//%20%20%20%20%20%20%20%20%20%20%20%20%7B/r/n//%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20result%20=%20String.format(/u0027CommandName:%20%7B0%7D
    request (400.jpg) and after hitting Yes/No continues with page loading (400_coninue.jpg).

    Please advise / help.

    Thanks,
    Arek
  2. Arkadiusz
    Arkadiusz avatar
    7 posts
    Member since:
    Oct 2010

    Posted 18 Oct 2010 Link to this post

    To fix the problem I replaced the telerik:RadScriptBlock with asp:Placeholder. This works for me.
  3. Albert
    Albert avatar
    4 posts
    Member since:
    Jul 2010

    Posted 17 Dec 2010 Link to this post

    I tried doing it but my Controls cannot access the javascript.

    Did you receive official support for this problem?
  4. Arkadiusz
    Arkadiusz avatar
    7 posts
    Member since:
    Oct 2010

    Posted 17 Dec 2010 Link to this post

    Actually when I switched from telerik:RadScriptBlock with asp:Placeholder it broke other functionality. Problem was solved when I added 
    <httpRuntime requestValidationMode="2.0"/>
    to the web.config in the system.web section.
  5. Albert
    Albert avatar
    4 posts
    Member since:
    Jul 2010

    Posted 18 Dec 2010 Link to this post

    This doesnt work either...

     But i found out what causes this as all calls to 
    $find("<%= RadAjaxManager.GetCurrent(Page).ClientID  %>");

    will generate this problem....

    By the way this happens inside a webuser control loaded by ajaxmanager.

    All i did is transfer all my codes having that line to the parent page...

Back to Top