Question

I'm developing a .NET 4.0 site in VS2010, running in IIS7.5 environment.

Every forum I check says that my version of Telerik RadControls for ASP.NET AJAX (V.2012.1.411.40) should play nicely with the AjaxControlToolkit elements. My Toolkit version is 4.1.7.1213.

I've tried to use RadScriptManager, but it blows up when it tries to $create the HoverMenuExtender control (at runtime) that I use within the RadGrid:

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnableScriptCombine="false" >
<scripts>
        <%--Needed for JavaScript IntelliSense in VS2010--%>
        <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
        <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
        <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
    </Scripts>
</telerik:RadScriptManager>

HoverMenuExtender inside RadGrid:

<ajaxToolkit:HoverMenuExtender ID="HoverMenuExtender1" runat="server" PopupControlID="popupImage"
                                TargetControlID="thumbnailImage" OffsetX="-10" OffsetY="-310" PopupPosition="Left"
                                PopDelay="100" HoverDelay="50">
                            </ajaxToolkit:HoverMenuExtender>

If I use this ToolkitScriptManager instead, my HoverMenuExtender control works, but none of the RadControls render correctly.

<ajaxToolkit:ToolkitScriptManager EnablePartialRendering="true" runat="Server" ID="RadScriptManager1">
    <Scripts>--%>
        <%--Needed for JavaScript IntelliSense in VS2010--%>
        <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
        <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
        <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
    </Scripts>
</ajaxToolkit:ToolkitScriptManager>

Any thoughts?

thanks.

Was it helpful?

Solution

Turns out there were a few things that needed to be added.

1a) You need to use the ToolkitScriptManager, and cannot use the RadScriptManager. (This is pretty well documented)

1b) In the <ToolkitScriptManager>, you must add CombineScripts='false' and ScriptMode='Release'. Also pretty well documented.

2) And this is NOT well documented, and took more digging than it should have (IMHO):

You need to add the path in web.config for the handler for the CombineScriptsHandler.axd. I final found this code:

<system.web>
    <httpHandlers>
    <!-- Using CombineCriptsHandler.axd as path of handler -->

    <add verb="*" path="CombineScriptsHandler.axd"

          type="AjaxControlToolkit.CombineScriptsHandler,

           AjaxControlToolkit" />
    </httpHandlers>
</system.web>



<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
   <handlers>

  <!-- Using CombineCriptsHandler as name of handler -->

  <add name="CombineScriptsHandler" verb="*"  

            path="CombineScriptsHandler.axd"

      type="AjaxControlToolkit.CombineScriptsHandler,

     AjaxControlToolkit" />

  </handlers>
</system.webServer>

That seems to have handled everything now. And my site is rendering with the RadControls again. There is a way to specifically control how the scripts are combined by adding an AjaxControlToolkit.config file. But that didn't seem necessary in my case.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top