This is a migrated thread and some comments may be shown as answers.

RegisterScriptDescriptors()

3 Answers 129 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Bader
Top achievements
Rank 1
Bader asked on 05 Jan 2011, 01:59 AM
Hello,

I have a problem.
I recieve the following error message (View the attached screen shot):

Error: Sys.WebForms.PageRequestManagerServerErrorException: Script control '' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
Parameter name: scriptControl

I tried the following script manager in my page:

1)
<

 

 

asp:ScriptManager runat="server" ID="ScriptManager1">

 

 

 

 

</asp:ScriptManager>

 

2)

<

 

 

telerik:RadScriptManager runat="server" ID="RadScriptManager1">

 

 

 

 

</telerik:RadScriptManager>

 

But the result is the same (the above error)

Can you please explain to me what is the meaning of the above error message.
It is apprecited if you give me the required code which fix the above error.

Regards,
Bader

3 Answers, 1 is accepted

Sort by
0
Lini
Telerik team
answered on 05 Jan 2011, 09:45 AM
Hello Bader,

The error can happen if you have some ajax controls inside a container control, which is made visible=false at some point in the page lifecycle. I cannot be certain what the cause of the error is without the code for the page or a sample project. You can also try searching our forums or a general Google search about this issue to see what is likely to cause it.

http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/script-controls-must-be-registered-using-registerscriptcontrol.aspx
http://www.telerik.com/community/forums/aspnet-ajax/window/script-controls-must-be-registered-using-registerscriptcontrol-before-calling-registerscriptdescriptors-parameter-name-scriptcontrol.aspx

Regards,
Lini
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Bader
Top achievements
Rank 1
answered on 05 Jan 2011, 11:04 AM
Hello,

Thank you for your reply,
Please download my sample application from http://www.thestarweb.com/Map.rar.
In order to make the error dialog displays, Please do the following:
1) After running the application for the first time click "Eilat"
2) Check the "Category1" checkbox
3) Click any one of the small maps which are located in the upper right side.
4) click another small map and then the error displays.

Note: I dont think that the "Full Screen" botton has any affect on the issue.

Please, I need an immediate help,
It is appreciated to send me the modified code.

Regards,
Bader
0
Lini
Telerik team
answered on 06 Jan 2011, 12:14 PM
Hello Bader,

The problem happens because you remove a control and then create a different control with the same ID. The ASP.NET page will try to load the state for the old control in the new one (because they have the same ID) and this will cause all sorts of problems, including the error you saw. You need to make sure that each time you load a user control (MainMapWebUserControl.ascx or SmallMapWebUserControl.ascx) after you have done a MapTableCell.Controls.Clear() you must use a new ID for the user control. Right now you are using only MainMapWebUserControl1 and SmallMapWebUserControl1. One way to do this is to have a simple counter and increment it each time you clear the controls collection of the map table cell and append the counter to the user control ID. This way you will be sure that an ID will not be repeated for new instances of the user control.

Regards,
Lini
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Dock
Asked by
Bader
Top achievements
Rank 1
Answers by
Lini
Telerik team
Bader
Top achievements
Rank 1
Share this question
or