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

Sharepoint : Webpart --> System.InvalidOperationException: Script controls may not be registered before PreRender.

7 Answers 230 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Tanuj
Top achievements
Rank 1
Tanuj asked on 07 Jul 2008, 09:31 PM

namespace C21.Webparts  
{  
    public class Usercontrol : WebPart  
    {  
        private string UserCtrlURL;  
 
        [Personalizable(PersonalizationScope.Shared),  
           WebBrowsable(true),  
          System.ComponentModel.Category("UserControl"),  
           WebDisplayName("UserControl page name"),  
          WebDescription("UserControl page name")]  
        public string MyURL  
        {  
            get { return UserCtrlURL; }  
            set { UserCtrlURL = value; }  
        }  
 
        protected override void CreateChildControls()  
        {  
            base.CreateChildControls();  
            Label ErrorTxt = new Label();  
            Controls.Clear();   
            //Controls.Add(Page.LoadControl("~/_layouts/21online/usercontrols/banners.ascx"));  
            try  
            {  
                if (MyURL.Length > 0)  
                    Controls.Add(Page.LoadControl(ConfigurationManager.AppSettings["UserControlsDir"] + MyURL));  
            }  
            catch (Exception ex)  
            {  
                ErrorTxt.Text=ex.Message;  
                Controls.Add(ErrorTxt);  
            }  
        }  
        public override void RenderControl(HtmlTextWriter output)  
        {  
            EnsureChildControls();  
            RenderChildren(output);  
        }  
    }  


Exception Details: System.InvalidOperationException: Script controls may not be registered before PreRender.  
 
Source Error:   
 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.    
 
Stack Trace:   
 
 
[InvalidOperationException: Script controls may not be registered before PreRender.]  
   System.Web.UI.ScriptControlManager.RegisterScriptControl(TScriptControl scriptControl) +236  
   System.Web.UI.ScriptManager.RegisterScriptControl(TScriptControl scriptControl) +99  
   Telerik.Web.UI.RadWebControl.RegisterScriptControl() +41  
   Telerik.Web.UI.RadDockZone.OnPreRender(EventArgs e) +245  
   System.Web.UI.Control.PreRenderRecursiveInternal() +77  
   System.Web.UI.Control.PreRenderRecursiveInternal() +161  
   System.Web.UI.Control.PreRenderRecursiveInternal() +161  
   System.Web.UI.Control.PreRenderRecursiveInternal() +161  
   System.Web.UI.WebControls.WebParts.WebPart.PreRenderRecursiveInternal() +62  
   System.Web.UI.Control.PreRenderRecursiveInternal() +161  
   System.Web.UI.Control.PreRenderRecursiveInternal() +161  
   System.Web.UI.Control.PreRenderRecursiveInternal() +161  
   System.Web.UI.Control.PreRenderRecursiveInternal() +161  
   System.Web.UI.Control.PreRenderRecursiveInternal() +161  
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360  
 
   
 
  
i installed ajax 1.0 and then the version 2008.1.619.20 of telerik on a server running wss 3.0 and then changed the web.config based on the documentation on "integrating Radcontrols in MOSS" section.

copied the Telerik.Web.UI.dll and telerik.charting.dll in the GAC

my webpart acts as a smart part which takes a usercontrol as input and renders it.

my usercontrol has dock objects in them.

here is my web.config file.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>  
<configuration> 
  <configSections> 
    <sectionGroup name="SharePoint">  
      <section name="SafeControls" type="Microsoft.SharePoint.ApplicationRuntime.SafeControlsConfigurationHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> 
      <section name="RuntimeFilter" type="System.Configuration.SingleTagSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> 
      <section name="WebPartLimits" type="System.Configuration.SingleTagSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> 
      <section name="WebPartCache" type="System.Configuration.SingleTagSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> 
      <section name="WebPartWorkItem" type="System.Configuration.SingleTagSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> 
      <section name="WebPartControls" type="System.Configuration.SingleTagSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> 
      <section name="SafeMode" type="Microsoft.SharePoint.ApplicationRuntime.SafeModeConfigurationHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> 
      <section name="MergedActions" type="System.Configuration.SingleTagSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> 
      <section name="PeoplePickerWildcards" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> 
    </sectionGroup> 
    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">  
      <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">  
        <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>  
        <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">  
          <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere" /> 
          <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" /> 
          <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" /> 
        </sectionGroup> 
      </sectionGroup> 
    </sectionGroup>      
    <sectionGroup name="System.Workflow.ComponentModel.WorkflowCompiler" type="System.Workflow.ComponentModel.Compiler.WorkflowCompilerConfigurationSectionGroup, System.Workflow.ComponentModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">  
      <section name="authorizedTypes" type="System.Workflow.ComponentModel.Compiler.AuthorizedTypesSectionHandler, System.Workflow.ComponentModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> 
    </sectionGroup> 
  </configSections> 
  <SharePoint> 
    <SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="true">  
      <PageParserPaths> 
      </PageParserPaths> 
    </SafeMode> 
    <WebPartLimits MaxZoneParts="50" PropertySize="1048576" /> 
    <WebPartCache Storage="CacheObject" /> 
    <WebPartControls DatasheetControlGuid="65BCBEE4-7728-41a0-97BE-14E1CAE36AAE" /> 
    <SafeControls> 
      <SafeControl Assembly="System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI.WebControls" TypeName="*" Safe="True" AllowRemoteDesigner="True" /> 
      <SafeControl Assembly="System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI.HtmlControls" TypeName="*" Safe="True" AllowRemoteDesigner="True" /> 
      <SafeControl Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI" TypeName="*" Safe="True" AllowRemoteDesigner="True" /> 
      <SafeControl Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI.WebControls" TypeName="SqlDataSource" Safe="False" AllowRemoteDesigner="False" /> 
      <SafeControl Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI.WebControls" TypeName="AccessDataSource" Safe="False" AllowRemoteDesigner="False" /> 
      <SafeControl Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI.WebControls" TypeName="XmlDataSource" Safe="False" AllowRemoteDesigner="False" /> 
      <SafeControl Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="System.Web.UI.WebControls" TypeName="ObjectDataSource" Safe="False" AllowRemoteDesigner="False" /> 
      <SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint" TypeName="*" Safe="True" AllowRemoteDesigner="True" /> 
      <SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.WebPartPages" TypeName="*" Safe="True" AllowRemoteDesigner="True" /> 
      <SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.WebControls" TypeName="*" Safe="True" AllowRemoteDesigner="True" /> 
      <SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.ApplicationPages" TypeName="*" Safe="True" AllowRemoteDesigner="True" /> 
      <SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.SoapServer" TypeName="*" Safe="True" AllowRemoteDesigner="True" /> 
      <SafeControl Assembly="Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.Meetings" TypeName="*" Safe="True" AllowRemoteDesigner="True" /> 
      <SafeControl Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint" TypeName="*" Safe="True" AllowRemoteDesigner="True" /> 
      <SafeControl Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.WebPartPages" TypeName="*" Safe="True" AllowRemoteDesigner="True" /> 
      <SafeControl Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.WebControls" TypeName="*" Safe="True" AllowRemoteDesigner="True" /> 
      <SafeControl Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.ApplicationPages" TypeName="*" Safe="True" AllowRemoteDesigner="True" /> 
      <SafeControl Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.SoapServer" TypeName="*" Safe="True" AllowRemoteDesigner="True" /> 
      <SafeControl Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.Meetings" TypeName="*" Safe="True" AllowRemoteDesigner="True" /> 
      <SafeControl Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.Workflow" TypeName="*" Safe="True" AllowRemoteDesigner="True" /> 
      <SafeControl Assembly="Microsoft.SharePoint.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.Search.WebControls" TypeName="*" Safe="True" AllowRemoteDesigner="True" /> 
      <SafeControl Assembly="Microsoft.SharePoint.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.Search.Internal.WebControls" TypeName="*" Safe="True" AllowRemoteDesigner="True" /> 
      <SafeControl Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TypeName="*" Safe="True" />        
      <SafeControl Src="~/_controltemplates/*" IncludeSubFolders="True" Safe="True" AllowRemoteDesigner="True" /> 
      <SafeControl Src="/App.21online/usercontrols/*" IncludeSubFolders="True" Safe="True" AllowRemoteDesigner="True" /> 
      <SafeControl Assembly="C21.Webparts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f737ac8a922be0c0" Namespace="C21.Webparts" TypeName="*" Safe="True" AllowRemoteDesigner="True" /> 
      <SafeControl Assembly="Telerik.Web.UI, Version=2008.1.619.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TypeName="*" Safe="True" AllowRemoteDesigner="false" /> 
      <SafeControl Assembly="Telerik.Web.UI, Version=2008.1.619.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.Design" TypeName="*" Safe="True" AllowRemoteDesigner="false" /> 
    </SafeControls> 
    <PeoplePickerWildcards> 
      <clear /> 
      <add key="AspNetSqlMembershipProvider" value="%" /> 
    </PeoplePickerWildcards> 
  </SharePoint> 
 
  <system.web> 
    <securityPolicy> 
      <trustLevel name="WSS_Medium" policyFile="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\config\wss_mediumtrust.config" /> 
      <trustLevel name="WSS_Minimal" policyFile="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\config\wss_minimaltrust.config" /> 
    </securityPolicy> 
    <httpHandlers> 
      <remove verb="GET,HEAD,POST" path="*" /> 
      <add verb="GET,HEAD,POST" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> 
      <add verb="OPTIONS,PROPFIND,PUT,LOCK,UNLOCK,MOVE,COPY,GETLIB,PROPPATCH,MKCOL,DELETE,(GETSOURCE),(HEADSOURCE),(POSTSOURCE)" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> 
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>  
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>  
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>        
    </httpHandlers> 
    <customErrors mode="RemoteOnly"></customErrors> 
    <httpRuntime maxRequestLength="51200" /> 
    <authentication mode="Windows" /> 
    <identity impersonate="true" /> 
    <authorization> 
      <allow users="*" /> 
    </authorization> 
    <httpModules> 
      <clear /> 
      <add name="SPRequest" type="Microsoft.SharePoint.ApplicationRuntime.SPRequestModule, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> 
      <add name="OutputCache" type="System.Web.Caching.OutputCacheModule" /> 
      <add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" /> 
      <add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule" /> 
      <add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationModule" /> 
      <add name="RoleManager" type="System.Web.Security.RoleManagerModule" /> 
      <add name="Session" type="System.Web.SessionState.SessionStateModule"/>  
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>        
    </httpModules> 
    <globalization fileEncoding="utf-8" /> 
    <compilation batch="false" debug="false">  
      <assemblies> 
        <add assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> 
        <add assembly="System.Web.Extensions, Version=1.0.61025.0,Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>          
      </assemblies> 
      <expressionBuilders> 
        <remove expressionPrefix="Resources" /> 
        <add expressionPrefix="Resources" type="Microsoft.SharePoint.SPResourceExpressionBuilder, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> 
        <add expressionPrefix="SPHtmlEncodedResources" type="Microsoft.SharePoint.SPHtmlEncodedResourceExpressionBuilder, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> 
        <add expressionPrefix="SPSimpleFormattingEncodedResources" type="Microsoft.SharePoint.SPSimpleFormattingEncodedResourceExpressionBuilder, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> 
      </expressionBuilders> 
    </compilation> 
    <pages enableSessionState="true" enableViewState="true" enableViewStateMac="true" validateRequest="false" pageParserFilterType="Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" asyncTimeout="7">  
      <namespaces> 
        <remove namespace="System.Web.UI.WebControls.WebParts" /> 
      </namespaces> 
      <controls> 
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> 
      </controls>        
      <tagMapping> 
        <add tagType="System.Web.UI.WebControls.SqlDataSource, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mappedTagType="Microsoft.SharePoint.WebControls.SPSqlDataSource, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> 
      </tagMapping> 
    </pages> 
    <siteMap defaultProvider="SPSiteMapProvider" enabled="true">  
      <providers> 
        <add name="SPNavigationProvider" type="Microsoft.SharePoint.Navigation.SPNavigationProvider, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> 
        <add name="SPSiteMapProvider" type="Microsoft.SharePoint.Navigation.SPSiteMapProvider, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> 
        <add name="SPContentMapProvider" type="Microsoft.SharePoint.Navigation.SPContentMapProvider, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> 
        <add name="SPXmlContentMapProvider" siteMapFile="_app_bin/layouts.sitemap" type="Microsoft.SharePoint.Navigation.SPXmlContentMapProvider, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> 
      </providers> 
    </siteMap> 
    <trust level="Full"  originUrl="" /> 
    <webParts> 
      <transformers> 
        <add name="TransformableFilterValuesToFilterValuesTransformer" type="Microsoft.SharePoint.WebPartPages.TransformableFilterValuesToFilterValuesTransformer, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> 
        <add name="TransformableFilterValuesToParametersTransformer" type="Microsoft.SharePoint.WebPartPages.TransformableFilterValuesToParametersTransformer, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> 
        <add name="TransformableFilterValuesToFieldTransformer" type="Microsoft.SharePoint.WebPartPages.TransformableFilterValuesToFieldTransformer, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> 
      </transformers> 
    </webParts> 
    <machineKey validationKey="7843910E7386CBDE22313A0F312BB78A735C6886F2C73FB5" decryptionKey="44EA22872E6770002B2F6B0E9993ECE7742A414E6D9C9C60" validation="SHA1" /> 
  </system.web> 
  <appSettings> 
    <add key="UserControlsDir" value="/App.21online/usercontrols/" /> 
    <add key="C21SiteName" value="http://sp-tanuj.grafica.com" /> 
    <add key="C21ContentSite" value="Test" /> 
    <add key="C21PageContent" value="CompleteList" /> 
    <add key="C21RelatedDocs" value="RelatedDocuments" /> 
    <add key="C21RelatedLinks" value="RelatedLinks" /> 
  </appSettings>    
  <runtime> 
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">  
      <dependentAssembly> 
        <assemblyIdentity name="Microsoft.SharePoint" publicKeyToken="71e9bce111e9429c" culture="neutral" /> 
        <bindingRedirect oldVersion="11.0.0.0" newVersion="12.0.0.0" /> 
      </dependentAssembly> 
      <dependentAssembly> 
        <assemblyIdentity name="Microsoft.SharePoint.Dsp" publicKeyToken="71e9bce111e9429c" culture="neutral" /> 
        <bindingRedirect oldVersion="11.0.0.0" newVersion="12.0.0.0" /> 
      </dependentAssembly> 
      <dependentAssembly> 
        <assemblyIdentity name="Microsoft.SharePoint.Dsp.OleDb" publicKeyToken="71e9bce111e9429c" culture="neutral" /> 
        <bindingRedirect oldVersion="11.0.0.0" newVersion="12.0.0.0" /> 
      </dependentAssembly> 
      <dependentAssembly> 
        <assemblyIdentity name="Microsoft.SharePoint.Dsp.SoapPT" publicKeyToken="71e9bce111e9429c" culture="neutral" /> 
        <bindingRedirect oldVersion="11.0.0.0" newVersion="12.0.0.0" /> 
      </dependentAssembly> 
      <dependentAssembly> 
        <assemblyIdentity name="Microsoft.SharePoint.Dsp.Sts" publicKeyToken="71e9bce111e9429c" culture="neutral" /> 
        <bindingRedirect oldVersion="11.0.0.0" newVersion="12.0.0.0" /> 
      </dependentAssembly> 
      <dependentAssembly> 
        <assemblyIdentity name="Microsoft.SharePoint.Dsp.XmlUrl" publicKeyToken="71e9bce111e9429c" culture="neutral" /> 
        <bindingRedirect oldVersion="11.0.0.0" newVersion="12.0.0.0" /> 
      </dependentAssembly> 
      <dependentAssembly> 
        <assemblyIdentity name="Microsoft.SharePoint.intl" publicKeyToken="71e9bce111e9429c" culture="neutral" /> 
        <bindingRedirect oldVersion="11.0.0.0" newVersion="12.0.0.0" /> 
      </dependentAssembly> 
      <dependentAssembly> 
        <assemblyIdentity name="Microsoft.SharePoint.Library" publicKeyToken="71e9bce111e9429c" culture="neutral" /> 
        <bindingRedirect oldVersion="11.0.0.0" newVersion="12.0.0.0" /> 
      </dependentAssembly> 
      <dependentAssembly> 
        <assemblyIdentity name="Microsoft.SharePoint.Security" publicKeyToken="71e9bce111e9429c" culture="neutral" /> 
        <bindingRedirect oldVersion="11.0.0.0" newVersion="12.0.0.0" /> 
      </dependentAssembly> 
      <probing privatePath="bin;_app_bin" /> 
    </assemblyBinding> 
  </runtime> 
  <location path="_layouts/images">  
    <system.web> 
      <authorization> 
        <allow users="*" /> 
      </authorization> 
    </system.web> 
  </location> 
  <location path="_layouts/mobile/mbllogin.aspx">  
    <system.web> 
      <authorization> 
        <allow users="*" /> 
      </authorization> 
    </system.web> 
  </location> 
  <System.Workflow.ComponentModel.WorkflowCompiler> 
    <authorizedTypes> 
      <authorizedType Assembly="System.Workflow.Activities, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Workflow.*" TypeName="*" Authorized="True" /> 
      <authorizedType Assembly="System.Workflow.ComponentModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Workflow.*" TypeName="*" Authorized="True" /> 
      <authorizedType Assembly="System.Workflow.Runtime, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Workflow.*" TypeName="*" Authorized="True" /> 
      <authorizedType Assembly="System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System*" TypeName="*" Authorized="True" /> 
      <authorizedType Assembly="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System*" TypeName="*" Authorized="True" /> 
      <authorizedType Assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System*" TypeName="*" Authorized="True" /> 
      <authorizedType Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.Workflow" TypeName="SPWorkflowActivationProperties" Authorized="True" /> 
      <authorizedType Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.Workflow" TypeName="SPWorkflowTaskProperties" Authorized="True" /> 
      <authorizedType Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.Workflow" TypeName="SPWorkflowHistoryEventType" Authorized="True" /> 
      <authorizedType Assembly="Microsoft.SharePoint.WorkflowActions, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.WorkflowActions" TypeName="*" Authorized="True" /> 
    </authorizedTypes> 
  </System.Workflow.ComponentModel.WorkflowCompiler> 
  <system.web.extensions> 
    <scripting> 
      <webServices> 
        <!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. --> 
        <!--
       <authenticationService enabled="true" requireSSL = "true|false"/>
     --> 
        <!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and writeAccessProperties attributes. --> 
        <!--  
     <profileService enabled="true" 
                     readAccessProperties="propertyname1,propertyname2" 
                     writeAccessProperties="propertyname1,propertyname2" /> 
     --> 
      </webServices> 
      <!--
     <scriptResourceHandler enableCompression="true" enableCaching="true" />
     --> 
    </scripting> 
  </system.web.extensions> 
  <system.webServer> 
    <validation validateIntegratedModeConfiguration="false"/>  
    <modules> 
      <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>d  
    </modules> 
    <handlers> 
      <remove name="WebServiceHandlerFactory-Integrated" /> 
      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" 
           type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>  
      <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>  
      <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> 
      <add name="Telerik.Web.UI.WebResource"  path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.1.619.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" /> 
    </handlers> 
  </system.webServer>    
</configuration> 

and here is the usercontrol source

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Portal.ascx.cs" Inherits="_21online_usercontrols_Portal" %> 
<%@ Register Assembly="Telerik.Web.UI, Version=2008.1.619.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" 
    Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<link href="/App.21online/C21Skin/Dock.C21Skin.css" rel="stylesheet" type="text/css" /> 
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> 
<telerik:RadDockLayout ID="RadDockLayout1" runat="server" EnableEmbeddedSkins="false" Skin="C21Skin">  
<table cellspacing="0" cellpadding="0" border="0" width="690">  
    <tr> 
        <td colspan="2">  
            <telerik:RadDockZone ID="RadDockZone1" runat="server" Width="698px" EnableEmbeddedSkins="false" HighlightedCssClass="Zone_Highlight" FitDocks="false" MinHeight="350px" MinWidth="695px" > 
                <telerik:RadDock ID="RadDock1" runat="server" Width="698px" height="398px" EnableEmbeddedSkins="false" Title="My Contacts">  
                    <contenttemplate> 
                    <iframe id="Iframe2" frameborder="0" src="http://staging.21online.com/app.21online/contacts/mycontacts.aspx" runat="server" height="365px" width="695px">  
                    </iframe>                      
                    </contenttemplate>                  
                </telerik:RadDock> 
            </telerik:RadDockZone>          
        </td> 
    </tr> 
    <tr> 
        <td class="zoneleft">  
            <telerik:RadDockZone ID="RadDockZone2" runat="server" Width="330px" EnableEmbeddedSkins="false" HighlightedCssClass="Zone_Highlight" MinHeight="243px" MinWidth="330px">  
                <telerik:RadDock ID="RadDock2" runat="server" Width="330px" height="243px" EnableEmbeddedSkins="false" Title="eCampaign Manager">  
                    <contenttemplate> 
                        <table cellpadding="0" cellspacing="0" border="0">  
                            <tr> 
                                <td colspan="3">  
                                    <table cellpadding="0" cellspacing="0" border="0" class="DockInnerTitle">  
                                        <tr> 
                                            <td> 
                                                <img src="/App.21online/images/build_newsletters.gif" alt="" border="0" />    
                                            </td> 
                                        </tr> 
                                    </table>                                  
                                </td> 
                            </tr> 
                            <tr> 
                                <td><img src="/App.21online/images/spacer.gif" alt="" width="5" height="100%"/></td> 
                                <td> 
                                    <div style="width:318px;">  
                                    <table cellpadding="3" cellspacing="2" border="0">  
                                        <tr> 
                                            <td style="text-align:left;vertical-align:top;"><href="#"><img src="/App.21online/images/build.gif" alt="" border="0" /></a></td> 
                                            <td style="text-align:left;vertical-align:top;">  
                                                <class="subtitle">Build<br /> 
                                                    <href="/ecards.aspx" class="white11">Design</a><br/>  
                                                    <href="/ecards.aspx" class="white11">Templates</a> 
                                                </p> 
                                            </td> 
                                            <td style="text-align:left;vertical-align:top;"><href="#"><img src="/App.21online/images/manage.gif" alt="" border="0" /></a></td> 
                                            <td style="text-align:left;vertical-align:top;">  
                                                <class="subtitle">Manage<br/> 
                                                    <href="/ecards.aspx" class="white11">Segments</a><br/>  
                                                    <href="/ecards.aspx" class="white11">Email Lists</a><br/>  
                                                    <href="/ecards.aspx" class="white11">Campaigns</a> 
                                                </p> 
                                            </td>                                  
                                        </tr> 
                                        <tr> 
                                            <td style="text-align:left;vertical-align:top;"><href="#"><img src="/App.21online/images/track.gif" alt="" border="0"/></a></td>  
                                            <td style="text-align:left;vertical-align:top;">  
                                                <class="subtitle">Track<br/> 
                                                   <href="http://www.c21poc.com:8080/login.aspx" target="_blank" class="white11">Track campaigns</a><br/>  
                                                   <href="http://www.c21poc.com:8080/login.aspx" target="_blank" class="white11">Setup new tracking</a> 
                                                </p> 
                                            </td> 
                                            <td style="text-align:left;vertical-align:top;"><href="#"><img src="/App.21online/images/admin.gif" alt="" border="0" /></a></td> 
                                            <td style="text-align:left;vertical-align:top;">  
                                                <class="subtitle">Admin<br/> 
                                                   <href="http://www.c21poc.com:8080/login.aspx" target="_blank" class="white11">User Administration</a><br/>  
                                                   <href="http://www.c21poc.com:8080/login.aspx" target="_blank" class="white11">Roles</a> 
                                                </p> 
                                            </td>                              
                                        </tr> 
                                    </table> 
                                    </div> 
                                </td> 
                                <td><img src="/App.21online/images/spacer.gif" alt="" width="5" height="100%"/></td> 
                            </tr> 
                        </table>                      
                    </contenttemplate>                  
                </telerik:RadDock> 
                <telerik:RadDock ID="RadDock4" runat="server" Width="330px" height="243px" EnableEmbeddedSkins="false" Title="My Listings">  
                    <contenttemplate> 
                    <!--<div style="overflow-x:hidden;overflow-y:scroll;height:207px;">--> 
                        <table cellpadding="0" cellspacing="0" border="0">  
                            <tr> 
                                <td colspan="3" style="width:100%;">  
                                    <table cellpadding="0" cellspacing="0" border="0" class="DockInnerTitle">  
                                        <tr> 
                                            <td> 
                                                <img src="/App.21online/images/sort_by_price.gif" alt="" border="0" />   
                                            </td> 
                                        </tr> 
                                    </table>                                  
                                </td> 
                            </tr> 
                            <tr> 
                                <td colspan="3" style="width:100%;">  
                                    <!--<div style="width:318px;">--> 
                                    <table cellpadding="3" cellspacing="0" border="0">  
 
                                        <tr class="row">  
                                            <td style="width:115px;"><img src="/App.21online/images/samplelisting1.gif" alt="" onmouseover="this.alt='This listing does not meet the minimum photos requirement';"/></td> 
                                            <td style="width:215px;">  
                                                <span class="white13bold">$500,000</span><br/>  
                                                <span class="white11bold">  
                                                    123 East main Street  
                                                <br/> 
                                                    West Chester,NY 12345  
                                                <br/> 
                                                <br/> 
                                                </span> 
                                                <href="" class="white11">Edit Listing</a>&nbsp;&nbsp;  
                                                <href="" class="white11">Email Listing</a>&nbsp;&nbsp;  
                                                <href="/listing_stats.aspx" class="white11" >Stats</a>&nbsp;  
                                            </td> 
                                        </tr> 
                                        <tr class="altrow">  
                                            <td><img src="/App.21online/images/samplelisting2.gif" alt=""/></td> 
                                            <td> 
                                                <span class="white13bold">$500,000</span><br/>  
                                                <span class="white11bold">  
                                                    209 West Valley Ave  
                                                <br/> 
                                                    Hackettstown,NJ 07840  
                                                <br/> 
                                                <br/> 
                                                </span> 
                                                <href="" class="white11">Edit Listing</a>&nbsp;&nbsp;  
                                                <href="" class="white11">Email Listing</a>&nbsp;&nbsp;  
                                                <href="/listing_stats.aspx" class="white11" >Stats</a>&nbsp;  
                                            </td> 
                                        </tr> 
                                        <tr class="row">  
                                            <td><img src="/App.21online/images/samplelisting1.gif" alt="" onmouseover="this.alt='This listing does not meet the minimum photos requirement';"/></td> 
                                            <td> 
                                                <span class="white13bold">$500,000</span><br/>  
                                                <span class="white11bold">  
                                                    123 East main Street  
                                                <br/> 
                                                    West Chester,NY 12345  
                                                <br/> 
                                                <br/> 
                                                </span> 
                                                <href="" class="white11">Edit Listing</a>&nbsp;&nbsp;  
                                                <href="" class="white11">Email Listing</a>&nbsp;&nbsp;  
                                                <href="/listing_stats.aspx" class="white11" >Stats</a>&nbsp;  
                                            </td> 
                                        </tr> 
                                        <tr class="altrow">  
                                            <td><img src="/App.21online/images/samplelisting2.gif" alt=""/></td> 
                                            <td> 
                                                <span class="white13bold">$500,000</span><br/>  
                                                <span class="white11bold">  
                                                    209 West Valley Ave  
                                                <br/> 
                                                    Hackettstown,NJ 07840  
                                                <br/> 
                                                <br/> 
                                                </span> 
                                                <href="" class="white11">Edit Listing</a>&nbsp;&nbsp;  
                                                <href="" class="white11">Email Listing</a>&nbsp;&nbsp;  
                                                <href="/listing_stats.aspx" class="white11" >Stats</a>&nbsp;  
                                            </td> 
                                        </tr> 
                                        <tr class="row">  
                                            <td><img src="/App.21online/images/samplelisting1.gif" alt="" onmouseover="this.alt='This listing does not meet the minimum photos requirement';"/></td> 
                                            <td> 
                                                <span class="white13bold">$500,000</span><br/>  
                                                <span class="white11bold">  
                                                    123 East main Street  
                                                <br/> 
                                                    West Chester,NY 12345  
                                                <br/> 
                                                <br/> 
                                                </span> 
                                                <href="" class="white11">Edit Listing</a>&nbsp;&nbsp;  
                                                <href="" class="white11">Email Listing</a>&nbsp;&nbsp;  
                                                <href="/listing_stats.aspx" class="white11" >Stats</a>&nbsp;  
                                            </td> 
                                        </tr> 
                                        <tr class="altrow">  
                                            <td><img src="/App.21online/images/samplelisting2.gif" alt=""/></td> 
                                            <td> 
                                                <span class="white13bold">$500,000</span><br/>  
                                                <span class="white11bold">  
                                                    209 West Valley Ave  
                                                <br/> 
                                                    Hackettstown,NJ 07840  
                                                <br/> 
                                                <br/> 
                                                </span> 
                                                <href="" class="white11">Edit Listing</a>&nbsp;&nbsp;  
                                                <href="" class="white11">Email Listing</a>&nbsp;&nbsp;  
                                                <href="/listing_stats.aspx" class="white11" >Stats</a>&nbsp;  
                                            </td> 
                                        </tr>              
                                    </table>     
                                    <!--</div>-->                               
                                </td> 
                            </tr> 
                         </table>   
                        <!--</div>-->                      
                    </contenttemplate>                  
                </telerik:RadDock> 
            </telerik:RadDockZone> 
        </td> 
        <td class="zoneright">  
            <telerik:RadDockZone ID="RadDockZone3" runat="server" Width="330px" EnableEmbeddedSkins="false" HighlightedCssClass="Zone_Highlight" MinHeight="243px" MinWidth="330px">  
                <telerik:RadDock ID="RadDock3" runat="server" Width="330px" height="243px" EnableEmbeddedSkins="false" Title="My News">  
                    <contenttemplate> 
                        <table cellpadding="0" cellspacing="0" border="0">  
                            <tr> 
                                <td colspan="3" style="width:100%;">  
                                    <table cellpadding="0" cellspacing="0" border="0" class="DockInnerTitle">  
                                        <tr> 
                                            <td> 
                                                <img src="/App.21online/images/modify_newsfeed.gif" alt="" border="0" />   
                                            </td> 
                                        </tr> 
                                    </table>                                  
                                </td> 
                            </tr> 
                            <tr> 
                                <td colspan="3" style="width:100%;">  
                                    <!--<div style="overflow-x:hidden;overflow-y:scroll;height:207px;width:318px;">--> 
                                    <table cellpadding="5" cellspacing="0" border="0">  
                                        <tr class="row">  
                                            <td> 
                                                <ul style="margin-top:2px;margin-bottom:3px;" > 
                                                    <li><a href="#" class="white10bold">Are Borrowers unfairly locked in high-cost loans ?</a></li>  
                                                </ul>    
                                            </td> 
                                        </tr> 
                                        <tr class="altrow">  
                                            <td> 
                                                <ul style="margin-top:2px;margin-bottom:3px;">  
                                                    <li><a href="#" class="white10bold">New market demands new client service tactics</a></li>  
                                                </ul>    
                                            </td> 
                                        </tr>                                          
                                        <tr class="row">  
                                            <td> 
                                                <ul style="margin-top:2px;margin-bottom:3px;">  
                                                    <li><a href="#" class="white10bold">Federal grant will assist unemployed mortgage workers</a></li>  
                                                </ul>    
                                            </td> 
                                        </tr> 
                                        <tr class="altrow">  
                                            <td> 
                                                <ul style="margin-top:2px;margin-bottom:3px;">  
                                                    <li><a href="#" class="white10bold">Get breaking real estate news and unbiased analysis</a></li>  
                                                </ul>    
                                            </td> 
                                        </tr>                                          
                                        <tr class="row">  
                                            <td> 
                                                <ul style="margin-top:2px;margin-bottom:3px;">  
                                                    <li><a href="#" class="white10bold">Real estate rates fall overnight</a></li>  
                                                </ul>    
                                            </td> 
                                        </tr> 
                                        <tr class="altrow">  
                                            <td> 
                                                <ul style="margin-top:2px;margin-bottom:3px;">  
                                                    <li><a href="#" class="white10bold">New market demands new client service tactics</a></li>  
                                                </ul>    
                                            </td> 
                                        </tr>                                          
                                        <tr class="row">  
                                            <td> 
                                                <ul style="margin-top:2px;margin-bottom:3px;">  
                                                    <li><a href="#" class="white10bold">Second Home Security</a></li>  
                                                </ul>    
                                            </td> 
                                        </tr> 
                                        <tr class="altrow">  
                                            <td> 
                                                <ul style="margin-top:2px;margin-bottom:3px;">  
                                                    <li><a href="#" class="white10bold">Realtor Ethics Discipline</a></li>  
                                                </ul>    
                                            </td> 
                                        </tr>                                          
                                      </table>                                          
                                    <!--</div>--> 
                                </td> 
                            </tr>                              
                         </table> 
                    </contenttemplate>                  
                </telerik:RadDock> 
                <telerik:RadDock ID="RadDock5" runat="server" Width="330px" height="243px" EnableEmbeddedSkins="false" Title="My Calendar">  
                    <contenttemplate> 
                        <table cellpadding="0" cellspacing="0" border="0">  
                            <tr> 
                                <td colspan="3">  
                                    <table cellpadding="0" cellspacing="0" border="0" class="DockInnerTitle">  
                                        <tr> 
                                            <td> 
                                                <img src="/App.21online/images/spacer.gif" alt="" width="318px" height="1" border="0" />   
                                            </td> 
                                        </tr> 
                                    </table>                                  
                                </td> 
                            </tr> 
                            <tr> 
                                <td><img src="/App.21online/images/spacer.gif" alt="" width="5"/></td> 
                                <td> 
                                    <table cellpadding="2" cellspacing="2" border="0">  
                                        <tr> 
                                            <td style="vertical-align:top;" > 
                                            </td> 
                                            <td style="vertical-align:top;">  
                                                <table cellpadding="5" cellspacing="0" border="0">  
                                                    <tr> 
                                                        <td> 
                                                            <span class="paratitle">February 29</span> 
                                                            <br />International Broker Convention   
                                                            <href="/events_calendar.aspx" class="white11">more...</a> 
                                                        </td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td> 
                                                            <span class="paratitle">March 2</span> 
                                                            <br />Open House for 123 Main Street   
                                                            <href="/events_calendar.aspx" class="white11">more...</a> 
                                                        </td> 
                                                    </tr>                                                      
                                                </table>   
                                            </td> 
                                        </tr> 
                                    </table>                                      
                                </td> 
                                <td><img src="/App.21online/images/spacer.gif" alt="" width="5" /></td>  
                            </tr> 
                         </table> 
                    </contenttemplate>                  
                </telerik:RadDock> 
            </telerik:RadDockZone> 
        </td> 
    </tr> 
</table> 
</telerik:RadDockLayout> 
 

please advise

7 Answers, 1 is accepted

Sort by
0
Sophy
Telerik team
answered on 08 Jul 2008, 11:53 AM
Hi Tanuj,

The error you experience is not directly related to Telerik's controls. It can be reproduced with any other ajax controls. This problem most often occurs when the OnPreRender method of the page is overridden and the base.OnPreRender(e) is not called or the ScriptManager is not registered or is registered too late in the page lifecycle (for example at page_load).
Let us know if you need further assistance.

Kind regards,
Sophy
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Tanuj
Top achievements
Rank 1
answered on 08 Jul 2008, 02:17 PM
i have added the OnInit event handler, but still getting the same error, calling the base.onprerender function

    public class Usercontrol : WebPart  
    {  
        private string UserCtrlURL;  
 
        [Personalizable(PersonalizationScope.Shared),  
           WebBrowsable(true),  
          System.ComponentModel.Category("UserControl"),  
           WebDisplayName("UserControl page name"),  
          WebDescription("UserControl page name")]  
        public string MyURL  
        {  
            get { return UserCtrlURL; }  
            set { UserCtrlURL = value; }  
        }  
 
        protected override void OnInit(EventArgs e)  
        {  
            base.OnPreRender(e);  
            base.OnInit(e);  
        }  
          
        protected override void CreateChildControls()  
        {  
            base.CreateChildControls();  
            Label ErrorTxt = new Label();  
            Controls.Clear();   
            //Controls.Add(Page.LoadControl("~/_layouts/21online/usercontrols/banners.ascx"));  
            try  
            {  
                if (MyURL.Length > 0)  
                    Controls.Add(Page.LoadControl(ConfigurationManager.AppSettings["UserControlsDir"] + MyURL));  
            }  
            catch (Exception ex)  
            {  
                ErrorTxt.Text=ex.Message;  
                Controls.Add(ErrorTxt);  
            }  
        }  
        public override void RenderControl(HtmlTextWriter output)  
        {  
            EnsureChildControls();  
            RenderChildren(output);  
        }  
    } 

please advise
0
Sophy
Telerik team
answered on 09 Jul 2008, 07:22 AM
Hello Tanuj,

If you do not override the OnPreRender event handler you do not need to call the base.OnPreRender(). However, I cannot find in your WebPart code registration of a script manager. Please, try to add the following in the OnInit event handler:
protected override void OnInit(EventArgs e)  
{  
    base.OnInit(e);  
    // Register the ScriptManager  
    ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);  
    if (scriptManager == null)  
    {  
        scriptManager = new ScriptManager();  
        scriptManager.ID = "ScriptManager1";  
        scriptManager.EnablePartialRendering = true;  
        Controls.AddAt(0, scriptManager);  
    }  

If you still experience any problems, do contact us again.

Kind regards,
Sophy
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Tanuj
Top achievements
Rank 1
answered on 09 Jul 2008, 02:30 PM
unfortunately, even that did'nt help. eventually i was able to figure this out by adding the following code, and now it is working.

Added a reference of Script Manager to the current Master Page.
     Add to the top of the Master Page: <%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" Namespace="System.Web.UI" TagPrefix="asp" %>

Added <asp:Scriptmanager/> right below the <WebPartPages/> in the master page.
     Look for in the Master Page: <WebPartPages:SPWebPartManager id="m" runat="Server"/>
     Add: <asp:ScriptManager ID="scriptManager1" runat="server"></asp:ScriptManager>

i got this code from the following post

http://geekswithblogs.net/WayneMagnum/archive/2008/07/05/ajax-enabled-webparts-in-moss-work-arounds.aspx

0
Sophy
Telerik team
answered on 10 Jul 2008, 07:50 AM
Hello Tanuj,

Judging form your last response the problem should really be due to the ScriptManager. In case the solution you have found does not meet your requirements, please, open a new support ticket  and attach all the needed files for running your WebPart so that we can test it locally on our MOSS server and investigate the issue. I would also like to ask you send us a list of the configuration steps you have done as well as steps to reproduce the problem. For your convenience I have attached a screenshot with instructions how to open a support ticket.

All the best,
Sophy
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
vairam
Top achievements
Rank 1
answered on 04 Aug 2008, 06:26 AM
hi
I'm also having the same problem.I followed ur post still im having the same problem .Script controls may not be registered before PreRender. can u help me


this is my code


<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Schedular.ascx.cs" Inherits="Cubisone.ZenListRollUp.Schedular" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<telerik:RadScheduler ID="RadScheduler1" runat="server">
</telerik:RadScheduler>




using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace Cubisone.ZenListRollUp
{
    public partial class Schedular : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            DataTable dtbind=new DataTable();
            dtbind.Columns.Add("ID",typeof(String));
            dtbind.Columns.Add("Start",typeof(DateTime));
            dtbind.Columns.Add("End",typeof(DateTime));
            dtbind.Columns.Add("Subject");
            DataRow drow = dtbind.NewRow();
            drow["ID"] = "100";
            drow["start"] = "08-02-2008 08:00:00";
            drow["End"] = "08-02-2008 09:00:00";
            drow["Subject"] = "Meeting with esakky";
            dtbind.Rows.Add(drow);           
            RadScheduler1.DataKeyField = "ID";
            RadScheduler1.DataStartField = "start";
            RadScheduler1.DataEndField = "End";
            RadScheduler1.DataSubjectField = "Subject";
            RadScheduler1.DataSource = dtbind;
            RadScheduler1.DataBind();

        }
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);
        }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            // Register the ScriptManager  
            ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);
            if (scriptManager == null)
            {
                scriptManager = new ScriptManager();
                scriptManager.ID = "ScriptManager1";
                scriptManager.EnablePartialRendering = true;
                Controls.AddAt(0, scriptManager);
            }
        } 
    }
}

0
T. Tsonev
Telerik team
answered on 05 Aug 2008, 10:11 AM
Hello Vairam,

Are you using a SmartPart to host your user control? If so, please use the AJAX-enabled SmartPart. Otherwise, please add the ScriptManager to the user control itself:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Schedular.ascx.cs" Inherits="Cubisone.ZenListRollUp.Schedular" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<asp:ScriptManager ID="ScriptManager" runat="server"
</asp:ScriptManager> 
 
<telerik:RadScheduler ID="RadScheduler1" runat="server"
</telerik:RadScheduler> 
 


Regards,
Tsvetomir Tsonev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Dock
Asked by
Tanuj
Top achievements
Rank 1
Answers by
Sophy
Telerik team
Tanuj
Top achievements
Rank 1
vairam
Top achievements
Rank 1
T. Tsonev
Telerik team
Share this question
or