We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

DiagramWebControl The control collection cannot be modified ...

Thread ID:

Created:

Updated:

Platform:

Replies:

109975 Jul 14,2013 07:20 AM Jul 15,2013 08:35 AM ASP.NET Web Forms (Classic) 2
loading
Tags: DiagramWebControl
Igor Malkov
Asked On July 14, 2013 07:20 AM

Hello.

I have problem to add new page with DiagramWebControl to existing website.

When I trying to load page with diagram I get following error:

 

Server Error in '/' Application.

The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.

 

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.

Source Error:

[No relevant source lines]


Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\b894f2a9\fbf83466\App_Web_a30c4m1s.0.cs    Line: 0

Stack Trace:

[HttpException (0x80004005): The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.] System.Web.UI.ControlCollection.RemoveAt(Int32 index) +9598151 System.Web.UI.ControlCollection.Clear() +40 Syncfusion.Web.UI.WebControls.Diagram.DiagramWebControl.OnUnload(EventArgs e) +646 System.Web.UI.Control.UnloadRecursive(Boolean dispose) +237 System.Web.UI.Control.UnloadRecursive(Boolean dispose) +173 System.Web.UI.Control.UnloadRecursive(Boolean dispose) +173 System.Web.UI.Page.UnloadRecursive(Boolean dispose) +23 System.Web.UI.Page.ProcessRequestCleanup() +56 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +245 System.Web.UI.Page.ProcessRequest() +72 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21 System.Web.UI.Page.ProcessRequest(HttpContext context) +58 ASP.orgchart_userorgcharttest_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\b894f2a9\fbf83466\App_Web_a30c4m1s.0.cs:0 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69



Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18033

I have tried to change application pools from integrated to classic.

When I create new web site with diagram control - everything ok.

Following aspx and cs files:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserOrgChartTest.aspx.cs" Inherits="OrgChart_UserOrgChart" %>

<%@ Register assembly="Syncfusion.Diagram.Web, Version=11.104.0.21, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" namespace="Syncfusion.Web.UI.WebControls.Diagram" tagprefix="syncfusion" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

<title></title>

</head>

<body>

 

 

 

<form id="form1" runat="server">

<syncfusion:DiagramWebControl ID="DiagramWebControl2" runat="server" Height="500px" Width="600px" />

 

 

 

</form>

</body>

</html>

 

 

 

///////////////////////////////////////////////////

 

using System;

using System.Collections.Generic;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class OrgChart_UserOrgChart : System.Web.UI.Page

 

 

{

 

protected void Page_Load(object sender, EventArgs e)

 

 

{

}

}

 

 

 

 

 

 

 

 

 

 

 

 

 


Igor Malkov
Replied On July 15, 2013 04:53 AM

Hello.

I have found the source of problem.

Need to append

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

Best regards.


Amsath Ali M [Syncfusion]
Replied On July 15, 2013 08:35 AM

Hi Igor,

 

Thanks for using Syncfusion products.

 

We are happy to hear that the issue has been resolved by yourself. Please let us know if you require any further assistance on this.

 

Regards,

Amsath


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;