Ok, I'm at the bottom of the pit of despair!
Have tried for days to resolve this problem, so maybe hoping someone here can help. I've searched the web and tried all the advice given, to no avail. Here is the problem.
I built a local project with RAD grid, cloud, combos etc and it worked fine. However, when I integrated it into out CMS, the problems started. The man error message is:
The problem is something to do with this piece of code:
The pages where I've tried this :
1. The master page
2. The ascx page
Doesn't matter where I position this line of code, I still get either the above error message. I've also tried these 2 different code blocks (not at the same time obviously) in the code behind of the ascx page:
Here is the stack trace:
I'm pretty much as my wits end with this. Any ideas Telerik, community?
Many thanks,
Alan
Have tried for days to resolve this problem, so maybe hoping someone here can help. I've searched the web and tried all the advice given, to no avail. Here is the problem.
I built a local project with RAD grid, cloud, combos etc and it worked fine. However, when I integrated it into out CMS, the problems started. The man error message is:
Script controls may not be registered before PreRender
The problem is something to do with this piece of code:
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
EnableHandlerDetection
=
"false"
runat
=
"server"
>
</
telerik:RadScriptManager
>
The pages where I've tried this :
1. The master page
2. The ascx page
Doesn't matter where I position this line of code, I still get either the above error message. I've also tried these 2 different code blocks (not at the same time obviously) in the code behind of the ascx page:
protected override void OnInit(EventArgs e)
{
if (ScriptManager.GetCurrent(this.Page) == null)
{
ScriptManager scriptManager = new ScriptManager();
scriptManager.ID = "myScriptManager";
scriptManager.EnablePartialRendering = true;
this.Page.Form.Controls.Add(scriptManager);
}
base.OnInit(e);
}
protected override void OnPreRender(EventArgs e)
{
if (ScriptManager.GetCurrent(this.Page) == null)
{
ScriptManager scriptManager = new ScriptManager();
scriptManager.ID = "myScriptManager";
scriptManager.EnablePartialRendering = true;
this.Page.Form.Controls.Add(scriptManager);
}
base.OnPreRender(e);
}
Here is the stack trace:
[InvalidOperationException: Script controls may not be registered before PreRender.]
System.Web.UI.ScriptControlManager.RegisterScriptControl(TScriptControl scriptControl) +348689
System.Web.UI.ScriptManager.RegisterScriptControl(TScriptControl scriptControl) +66
Telerik.Web.UI.RadWebControl.RegisterScriptControl() +42
Telerik.Web.UI.RadWebControl.ControlPreRender() +15
Telerik.Web.UI.RadFormDecorator.ControlPreRender() +464
Telerik.Web.UI.RadWebControl.OnPreRender(EventArgs e) +22
System.Web.UI.Control.PreRenderRecursiveInternal() +80
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
I'm pretty much as my wits end with this. Any ideas Telerik, community?
Many thanks,
Alan