Welcome Guest Search | Active Topics | Sign In | Register

Getting an error when Options
Kevin Jones
Posted: Saturday, November 13, 2010 7:52:18 PM
Rank: Member
Groups: Member

Joined: 11/12/2010
Posts: 16
EO.Web Controls Client Side Debug Message:

EO.Web control 'ctl00_BodyContentPlaceHolder_CallbackPanel1' error message:The callback on 'ctl00_BodyContentPlaceHolder_CallbackPanel1' has failed due to a server side exception. Please check the server side code.(set ClientSideOnError to handle this error).

You can turn off this message by setting EO.Web.Runtime.DebugLevel to 0 (Not recommended for debug build).

The HTML code that triggers it:

OnClick="eo_Callback('CallbackPanel1');"

How can I fix the error so that I don't have to set EO.Web.Runtime.DebugLevel to 0?
eo_support
Posted: Sunday, November 14, 2010 7:36:46 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

This is usually a code error in your server side code. You will need to try to find out what that error is. You can disable the CallbackPanel and then if the same error occurs. If that does not reveal anything, try to comment your .aspx and code behind block by block until you can find out what triggered the error.

Thanks!
Kevin Jones
Posted: Sunday, November 14, 2010 12:19:28 PM
Rank: Member
Groups: Member

Joined: 11/12/2010
Posts: 16
There is no code for the CallbackPanel. I am implementing the UI lockout function which requires the CallbackPanel but no server side code. Or so I thought.

I don't get the error if I just use the CallbackPanel's Trigger setting:

<eo:CallbackPanel runat="server" ID="CallbackPanel1" LoadingDialogID="DialogWait" Triggers="{ControlID:ButtonForgotPassword;Parameter:}">

But I do get the error when forcing the CallbackPanel using OnClick="eo_Callback('CallbackPanel1');" in a control which is required in a Repeater.
eo_support
Posted: Sunday, November 14, 2010 1:46:52 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
The code that throws the exception is rarely the code for the CallbackPanel. That's why you need to find out exactly what it is. If you can not, we can find it for you if you can isolate the problem into a test page. Note that the test page should contain only code needed to reproduce the problem.

Thanks!
Kevin Jones
Posted: Monday, November 15, 2010 11:20:29 AM
Rank: Member
Groups: Member

Joined: 11/12/2010
Posts: 16
I've narrowed it down to a redirect. If I do a Response.Redirect to a different page, the error occurs while the Response.Redirect method is running and control never returns to my code so that it can exit. The server side hangs at that point and I have to stop the debugger.

Is there a way to close the lockout "dialog" from the server side?
Kevin Jones
Posted: Monday, November 15, 2010 11:21:51 AM
Rank: Member
Groups: Member

Joined: 11/12/2010
Posts: 16
And, if I have executed:

EO.Web.Runtime.DebugLevel = EO.Web.Consts.DebugLevel_Off;

it still hangs but without the error dialog.
eo_support
Posted: Monday, November 15, 2010 2:31:53 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Make sure you call Response.Redirect early enough. For example, in your Page_Load event. Do not call it inside your CallbackPanel's Execute event. That event is triggered very late in the page's life cycle and will not work.

Thanks!
Kevin Jones
Posted: Monday, November 15, 2010 3:08:31 PM
Rank: Member
Groups: Member

Joined: 11/12/2010
Posts: 16
It's called at the end of a button event handler. So Init is called, Load is called, then the Button event handler. I can't get any earlier than that.

Why is EO having an issue? Can I force the "dialog" to close from the server code before I execute the Redirect method? Will implementing an event handler for the CallbackPanel help?

Remember that I am implementing an EO solution that does not require any server code.
eo_support
Posted: Monday, November 15, 2010 3:12:28 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

We do not know exactly what is causing your particular error. Please try to isolate the problem into a test page so that we can take a look. Please make sure the test page contains only code needed to reproduce the error and also run independently. Once we have that we will try to run it here. As long as we see the error, we should be able to tell you what's causing it.

Thanks!
Kevin Jones
Posted: Saturday, January 22, 2011 3:47:12 AM
Rank: Member
Groups: Member

Joined: 11/12/2010
Posts: 16
The problem is simple. Your CallbackPanel is choking when a redirect is invoked as I stated above. In the code below, click Go1 and see the redirect function as expected without incident (no CallbackPanel is invoked.) Click Go2 and the application chokes (CallbackPanel is invoked.)

Page 1:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test-eo-1.aspx.cs" Inherits="TestEO1" %>

<!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 id="Head1" runat="server">
<title>Untitled Page</title>
</head>
<body>
<eo:CallbackPanel runat="server" ID="CallbackPanel" LoadingDialogID="DialogWait" Triggers="{ControlID:ButtonGo2;Parameter:}">
<form id="form1" runat="server">
<div>
<asp:Button ID="ButtonGo1" runat="Server" Text="Go1" Width="40px" OnClick="ButtonGo_Click" />
<asp:Button ID="ButtonGo2" runat="Server" Text="Go2" Width="40px" OnClick="ButtonGo_Click" />
</div>
</form>
</eo:CallbackPanel>
</body>
</html>

Page 1 code:

using System;

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

}

protected void ButtonGo_Click(object sender, EventArgs e)
{
Response.Redirect("test-eo-2.aspx");
}
}

Page 2:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test-eo-2.aspx.cs" Inherits="TestEO2" %>

<!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">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
Here.
</div>
</form>
</body>
</html>

Page 2 code:

using System;

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

}
}
eo_support
Posted: Saturday, January 22, 2011 8:30:13 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi Kevin,

We try to run your code at here and it does work fine. Except for early versions, Our CallbackPanel does support Response.Redirect. We did have to change your markup a little bit because your html form is inside the Callback, I am assuming that is a typo. The CallbackPanel must be placed inside the form element.

Thus I would suggest you to try the latest version first, if the problem still occurs, please create a test project and send the test project to us. We will PM you as to where to send.

Thanks!
Kevin Jones
Posted: Saturday, January 22, 2011 12:14:22 PM
Rank: Member
Groups: Member

Joined: 11/12/2010
Posts: 16
I installed the latest version (8.0.44.2) and placed the CallbackPanel inside the form element. The same error still occurs.

Page 1:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test-eo-1.aspx.cs" Inherits="TestEO1" %>

<!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 id="Head1" runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<eo:CallbackPanel runat="server" ID="CallbackPanel" LoadingDialogID="DialogWait" Triggers="{ControlID:ButtonGo2;Parameter:}">
<div>
<asp:Button ID="ButtonGo1" runat="Server" Text="Go1" Width="40px" OnClick="ButtonGo_Click" />
<asp:Button ID="ButtonGo2" runat="Server" Text="Go2" Width="40px" OnClick="ButtonGo_Click" />
</div>
</eo:CallbackPanel>
</form>
</body>
</html>

Page 1 code:

using System;

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

}

protected void ButtonGo_Click(object sender, EventArgs e)
{
Response.Redirect("test-eo-2.aspx");
}
}

Page 2:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test-eo-2.aspx.cs" Inherits="TestEO2" %>

<!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">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
Here.
</div>
</form>
</body>
</html>

Page 2 code:

using System;

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

}
}
eo_support
Posted: Saturday, January 22, 2011 2:20:58 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Please try to add our HttpModule into web.config. It will be something like this:

Code: HTML/ASPX
<httpModules>
    <!-- You already have this --->
    <add name="ScriptModule" 
        type="System.Web.Handlers.ScriptModule, 
        System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
        PublicKeyToken=31BF3856AD364E35"/>

    <!-- Add this line --->
    <add name="EOWebRuntime" type="EO.Web.Runtime,EO.Web"/>
</httpModules>


That should correct the issue for you.

Thanks!
Kevin Jones
Posted: Saturday, January 22, 2011 3:12:20 PM
Rank: Member
Groups: Member

Joined: 11/12/2010
Posts: 16
Problem solved. Thank you.
eo_support
Posted: Saturday, January 22, 2011 4:04:08 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Great. Glad that it works for you!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.