Welcome Guest Search | Active Topics | Sign In | Register

CALLBACKPANEL Options
Marcela
Posted: Monday, July 14, 2008 10:33:10 AM
Rank: Newbie
Groups: Member

Joined: 6/28/2007
Posts: 6
HI,
I HAVE A DEFAULT WEB FORM WITH A MENU AND A CALLBACKPANEL WITH A MULTIPAGE (and a page) INSIDE WHERE I WANT TO LOAD CONTROLS DYNAMICALLY.
I MADE THIS SIMPLE EXAMPLE TO SIMULATE THE ERROR
THE BUTTON IN THE CONTROL IS A CALLBACKPANEL TRIGGER AND I HAVE THE FOLLOWING ERROR WHEN I CLICK IT.

THANKS.


EO.Web Controls Client Side Debug Message:

EO.Web control 'ctl03_CallbackPanel1' error message (set ClientSideOnError to handle this error):The callback on 'ctl03_CallbackPanel1' has failed because the server did not recognize this callback and processed it as a normal request. This can occur if there are multiple Callback/CallbackPanel controls in the page, and this Callback/CallbackPanel control was initially dynamically loaded but wasn't loaded for this callback.

This can also occur if you have called Response.Redirect on the server side. Callback/CalbackPanel provides a Redirect method for such scenario. Please use the Callback/CallbackPanel's Redirect method in this case.

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


Default.aspx

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>

<!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>Página sin título</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<eo:Menu ID="Menu1" runat="server" RaisesServerEvent="True" Width="300px">
<TopGroup>
<Items>
<eo:MenuItem Text-Html="Item1">
<SubMenu>
<Items>
<eo:MenuItem Text-Html="Item11">
</eo:MenuItem>
</Items>
</SubMenu>
</eo:MenuItem>
<eo:MenuItem Text-Html="Item2">
</eo:MenuItem>
<eo:MenuItem Text-Html="Item3">
</eo:MenuItem>
</Items>
</TopGroup>
</eo:Menu>

</div>
<eo:CallbackPanel ID="CallbackPanel1" runat="server" Height="150px" Triggers="{ControlID:Menu1;Parameter:}"
Width="200px">
<eo:MultiPage ID="mpPpial" runat="server" Height="180px" Width="100%">
<eo:PageView ID="pvControl" runat="server" Width="100%">
</eo:PageView>
</eo:MultiPage>
</eo:CallbackPanel>
</form>
</body>
</html>



Imports System
Imports System.Collections
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Web
Imports System.Web.SessionState
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls
Imports System.IO
Imports System.Globalization
Imports System.Threading

Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub Menu1_ItemClick(ByVal sender As Object, ByVal e As EO.Web.NavigationItemEventArgs) Handles Menu1.ItemClick
Select Case e.MenuItem.Text.ToString

Case "Item11"
mpPpial.SelectPageByID("pvControl")
Dim fileName As String = Path.Combine("~\", "Control.ascx")
If File.Exists(Request.MapPath(fileName)) Then
Dim demo As System.Web.UI.Control = Page.LoadControl(fileName)
pvControl.Controls.Add(demo)
End If

End Select

End Sub
End Class



Control.ascx

<%@ Control Language="VB" AutoEventWireup="false" CodeFile="Control.ascx.vb" Inherits="Control" %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>
<eo:CallbackPanel ID="CallbackPanel1" runat="server" Height="150px" Triggers="{ControlID:Button1;Parameter:}"
Width="200px">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" />
</eo:CallbackPanel>



Partial Class Control
Inherits System.Web.UI.UserControl

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Text = "Help me!!!!"
End Sub
End Class

eo_support
Posted: Monday, July 14, 2008 10:48:58 AM
Rank: Administration
Groups: Administration

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

This is very normal. Please see the following post for more details:

http://essentialobjects.com/Forum/Default.aspx?g=posts&t=1179#5018

Thanks


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.