C1 Community
ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

'c1wc_C1WebChart' is undefined and 'c1cb_createcontext' is undefined

rated by 0 users
This post has 7 Replies | 4 Followers

Not Ranked
Posts 8
jayanth.bn Posted: Tue, Apr 21 2009 6:15 AM

Hi All,

 i am using C1.Web.C1WebChart.2.dll for creating a chart. when i run the application i am getting error in javascript as 'c1wc_C1WebChart' is undefined and 'c1cb_createcontext' is undefined one after the other. can any one help me.

 Jayanth

Top 25 Contributor
Posts 359
C1_SteveB replied on Wed, Apr 22 2009 1:27 PM

Hello,

 Hope all is well.

Check if you have the same version of the C1WebChart and C1Chart dll in your application bin directory. Remove them from GAC if any. If this does not solve the purpose then please attach a small sample replicating this issue.

Thanks,

-Steve

Not Ranked
Posts 8

Thanks Steve for the reply.

i am using c1.web.c1webchart.2.dll of version 2.0.20082.18078 and c1.win.c1webchart.2.dll of version 2.0.20082.18078 in my project. both the versions are same.

i have put the c1chart inside update panel in order to prevent postback. is this creating any problem for me? Please reply.

 Thanks and Regards,

 Jayanth Nadig

Not Ranked
Posts 8

Steve,

If i remove the c1chart from the update panel the application will work perfectly. if i include c1chart in update panel then the error appears inside script manager saying 'c1wc_C1WebChart' is undefined and 'c1cb_createcontext' is undefined.

 Please help me.

Thanks and Regards,

Jayanth Nadig

Not Ranked
Posts 2
slatzer replied on Mon, Jul 13 2009 7:35 PM

Any solution for this problem?

Are C1 controls not compatible with Ajax.Net?

Regards

Stefan

Simple Sample:

Default3.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>
<%@ Register assembly="C1.Web.C1WebChart.2" namespace="C1.Web.C1WebChart" tagprefix="C1WebChart" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
    </div>
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
            <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" Visible="False">
        <ContentTemplate>
            <C1WebChart:C1WebChart ID="C1WebChart1" runat="server">
            </C1WebChart:C1WebChart>
        </ContentTemplate>
    </asp:UpdatePanel>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>

Default3.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Default3 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        UpdatePanel1.Visible = true;
    }
}
 

Top 25 Contributor
Posts 372

Hello Stefan,

I am having no problems using the ComponentOne controls within an UpdatePanel.  Please see the attached sample.  If this does not help, could you please provide a small, simplified sample that reproduces you problem?  Thanks and I hope this helps!

Regards,

-Raleigh

Not Ranked
Posts 2
slatzer replied on Tue, Jul 14 2009 10:37 AM

Hi Raleigh,

this only happens, if the UpdatePanel isn't Visible at initial Page Request. See the sample in my previous post.
I've found a workaround, I placed a WebChart with size 0;0 outside the UpdatePanels. Ugly, but it works.

Regards

Stefan

Top 25 Contributor
Posts 372

Hello Stefan,

I am still unable to reproduce this problem.  I am attaching another sample for you to take a look at.  Please feel free to make any corrections to this sample to make it reproduce the issue.  I look forward to your reply.

Regards,

-Raleigh

Page 1 of 1 (8 items) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.