Welcome Guest Search | Active Topics | Sign In | Register

Dialog and UpdatePanel Options
Mikko
Posted: Friday, September 23, 2011 6:00:45 AM
Rank: Newbie
Groups: Member

Joined: 7/26/2011
Posts: 3
Hello.

I have problems showing dialog from ASP.NET AJAX's asynchronous postbacks. Below is example. Dialog is displayed if click button(btnShowNonUpdatepanel) that is not inside updatepanel(normal postback). But if you click button(btnShowUpdatePanel) that causes asynchronous postback, the dialog won't be displayed. How to fix this problem?

I have EO.Web.dll version 9.0.25.2. Tested with Google chrome v14.0.835.186 m, Firefox v6.0.2 and Internet Explorer v9.0.8112.16421 (inc. kb2559049).

Thanks in advance.
Mikko


My test aspx:
Code: HTML/ASPX
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="EO_Dialog_Debug._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></title></head>
<body>    
    <form id="form1" runat="server">
    
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>    
        <eo:ScriptManager ID="ScriptManager2" runat="server"></eo:ScriptManager>
    
        <asp:Button ID="btnShowNonUpdatepanel" runat="server" Text="Show not in updatepanel" />
    
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">    
            <ContentTemplate>
                <asp:Button ID="btnShowUpdatePanel" runat="server" Text="Show dialog" />
            </ContentTemplate>
        </asp:UpdatePanel>

        <eo:Dialog ID="master_dialog" runat="server" Width="200px" Height="200px"  >
            <ContentStyleActive CssText="border-top: #335c88 1px solid; background-color: #e5f1fd" />
            <ContentTemplate>
                <asp:Label ID="lblHello" runat="server" Text="Hello World"></asp:Label><br />
                <asp:Button ID="btnOk" runat="server" Text="OK" />
                <asp:Button ID="btnCancel" runat="server" Text="Cancel" />
            </ContentTemplate>
        </eo:Dialog>        

    </form>
</body>
</html>


And Visual Basic.NET code behind:
Code: Visual Basic.NET
Public Class _Default
    Inherits System.Web.UI.Page

    Private Sub btnShowUpdatePanel_Click(sender As Object, e As System.EventArgs) Handles btnShowUpdatePanel.Click
        master_dialog.Show()
    End Sub

    Private Sub btnShowNonUpdatepanel_Click(sender As Object, e As System.EventArgs) Handles btnShowNonUpdatepanel.Click
        master_dialog.Show()
    End Sub

End Class
eo_support
Posted: Friday, September 23, 2011 8:15:15 AM
Rank: Administration
Groups: Administration

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

Whatever you want to update, you need to put it inside the UpdatePanel.

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.