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

Script control '' is not a registered script control

1 Answer 112 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Chanan Zass
Top achievements
Rank 1
Chanan Zass asked on 04 Sep 2009, 04:07 PM
Greetings,

Here's a strange thing: I have a RadTabStrip with a RadMultiPage all set up and working.
Moving from one tab to another creates always a new PageView (a userControl).
Usually all works beautifully. But when we go back a tab, correct certain form data and resubmitting in order to ahead again (recreacting the next PageView), we get the following error message:

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

This happens only on opening one tab. No problem with any other. The tab in question includes
- a RadGrid
- a RadWindowManager (required for editing RadGrid items
- RadAjaxManager
- RadAjaxLoadingPanel

A RadScriptManager is placed in the WebForm (.aspx) page that contains the RadTabStrip.

As mentioned, when you just move forward from one tab to another there are no problems. That problem happens only when going back one tab and clicking submit again to move forward.

Any clue?
Thanks much.

1 Answer, 1 is accepted

Sort by
0
Chanan Zass
Top achievements
Rank 1
answered on 04 Sep 2009, 09:47 PM
I've fixed the problem by avoiding the recreation of the new PageView:
While before I've used this code:
Dim myTabStrip As RadTabStrip = CType(Page.Master.FindControl("MainPageContent").FindControl("RadTabStrip1"), RadTabStrip)  
Dim myMultiPage As RadMultiPage = CType(Page.Master.FindControl("MainPageContent").FindControl("RadMultiPage1"), RadMultiPage)  
 
Dim pageView As New RadPageView()  
pageView.ID = "MyNewPage" 
Dim currentNextPageView As RadPageView = myMultiPage.FindPageViewByID("MyNewPage")  
If currentNextPageView IsNot Nothing Then  
    myMultiPage.PageViews.Remove(currentNextPageView)  
End If  
myMultiPage.PageViews.Add(pageView)  
 
myTabStripmyTabStrip.SelectedIndex = myTabStrip.SelectedIndex + 1  
myTabStrip.SelectedTab.Enabled = True 
myMultiPagemyMultiPage.SelectedIndex = myMultiPage.SelectedIndex + 1 

I now have:
If currentNextPageView Is Nothing Then  
   myMultiPage.PageViews.Add(pageView)  
End If  
 

Now the page gets recreated only when it does not exists.
Problem was probaly due to the fact that even when you remove the PageView, the related ScriptResources are not removed.

Tags
TabStrip
Asked by
Chanan Zass
Top achievements
Rank 1
Answers by
Chanan Zass
Top achievements
Rank 1
Share this question
or