質問

We just upgraded our Telerik controls from 2012.3.1308.45 to 2014.1.1403.45. As a result, a page that previously worked, doesn't now.

The initial error is as follows:

Script control 'RadWindowManager1' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().

There are a couple of postings on the Telerik site about this. The preferred solution seems to be to set the RegisterWithScriptManager attribute on the control to false.

Doing this, then, makes another error pop up. So, I'm not sure if I'm moving forward or not. The new error is:

Multiple controls with the same ID 'RadWindowManager1_alerttemplate' were found. FindControl requires that controls have unique IDs.

The page has a bunch of Response.Write(...) ASP .NET expressions in the form of: <%=MyControl.ControlID%>. Every one of these expressions causes this error.

At this point, I'm stumped.

There was another posting on the Telerik site that suggested adding a Location element to the web.config for the Telerik.Web.UI.WebResource.axd would solve this. I tried that and it didn't do any good.

I also tried to use the Microsoft ScriptManager rather than the Telerik RadScriptManager, and that doesn't do any good.

I checked my web.config for duplicate entries, and there are none. I don't know what else to do. I'd appreciate any assistance on this issue.

For what it's worth, I've made some progress or dug myself deeper into a hole. I don't know:

Working with the second error, the multiple control issue, I discovered that we had on our page, a couple of controls that I got rid of.

First, I removed:

 <telerik:RadCodeBlock runat="server"></telerik:RadCodeBlock>

primarily, this block appeared empty as there was nothing inside of it. Don't know if it's needed or not, but I removed it.

Second, I removed this:

<telerik:RadAjaxPanel ID="gridPanel" runat="server" LoadingPanelID="gridLoadingPanel">
            <telerik:RadAjaxLoadingPanel ID="gridLoadingPanel" runat="server" Transparency="5">
                <asp:Image ID="Image1" runat="server" AlternateText="Loading..." BorderWidth="0px" ImageUrl="~/App_Themes/Default/Images/Administration/Loading.gif"></asp:Image>
            </telerik:RadAjaxLoadingPanel>

which existed, but wasn't being used at all.

When I did that, I got another new and exciting error:

RegisterForEventValidation can only be called during Render();

Using Google, I found out that one solution is to do this:

  1. Add EnableEventValidation="false" to the Page directive.

  2. Override the VerifyRenderingInServerForm in the code behind with nothing in it.

Did that, and now an even more newer and exciting error occurs.

Script control 'nameOfControl' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().

The control in question is a RadNumericTextBox displayed within a table.

So, either I'm going deeper and deeper into a rabbit hole here, or I'm slowly working through multiple errors. I have no idea which it is.

Searching for this last error isn't giving me anything concrete to work with, though. Any additional help would be appreciated.

役に立ちましたか?

解決

Make sure you do not have ClientIDMode set to Static for Telerik controls.

Then, if you use AJAX, wrap server code blocks in a RadCodeBlock tag (some server code blocks)

take away AjaxControlToolkit if you have it, it outputs changed MS AJAX scripts.

Don't use Response.Write() and the like if you use partial postbacks

If neither helps, strip down the page piece by piece to find the problem (e.g., some customization you have in place).

他のヒント

For me it helped to set the RegisterWithScriptManager="true".

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top