Windows & UpdatePanel

  1. #1

    Windows & UpdatePanel

    HI,
    I'm a .Net developper & i use coolite toolkit.
    my problem is:
    I would develop an authentification page. i have a button, when i click, i show a coolite window to write login & password. i would like, after verification close the window.
        <form id="form1" runat="server">
            
            <asp:ScriptManager ID="ScriptManager2" runat="server"> </asp:ScriptManager>
                <cool:ScriptManager ID="ScriptManager1" runat="server" />
                <cool:Panel ID="Panel1" runat="server" Header="False" HeaderAsText="False" Height="81px"
                    BodyBorder="False" >
                    <Content>
                        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                            <ContentTemplate>
                                <div runat="server" id="divmenu" visible="false" style="background-image: url(../../img/blue.jpg)">
                                    <asp:Table ID="_TbMenu" runat="server" Width="100%" Height="100%">
                                        <asp:TableRow ID="TableRow4" runat="server">
                                            <asp:TableCell ID="TableCell9" runat="server" Width="80%"></asp:TableCell>
                                            <asp:TableCell ID="TableCell1" runat="server" Width="2%">
                                                <asp:Image ID="Image1" runat="server" ImageUrl="../../img/expand.gif" />
                                            </asp:TableCell>
                                            <asp:TableCell ID="TableCell8" runat="server" Width="18%">
                                                <asp:LinkButton ID="LinkButton2" CssClass="lbLibelle" runat="server">Administration</asp:LinkButton>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                        <asp:TableRow ID="TableRow2" runat="server">
                                            <asp:TableCell ID="TableCell2" runat="server" Width="80%"></asp:TableCell>
                                            <asp:TableCell ID="TableCell3" runat="server" Width="2%">
                                                <asp:Image ID="Image2" runat="server" ImageUrl="../../img/expand.gif" />
                                            </asp:TableCell>
                                            <asp:TableCell ID="TableCell6" runat="server" Width="18%">
                                                <asp:LinkButton ID="LinkButton3" CssClass="lbLibelle" runat="server" EnableTheming="false">Accéder à WebIntéressement</asp:LinkButton>
                                            </asp:TableCell>
                                        </asp:TableRow>
                                        <asp:TableRow ID="TableRow3" runat="server">
                                            <asp:TableCell ID="TableCell4" runat="server" Width="80%"></asp:TableCell>
                                            <asp:TableCell ID="TableCell5" runat="server" Width="2%"></asp:TableCell>
                                            <asp:TableCell ID="TableCell7" runat="server" Width="18%"></asp:TableCell>
                                        </asp:TableRow>
                                    </asp:Table>
                                
    
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="_Btconnecter" EventName="click" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </Content>
                </cool:Panel>
                <cool:Panel ID="Panel2" runat="server" ButtonAlign="Left" Header="False" BodyBorder="False" Height="500">
                    <Content>
    
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                                <asp:Table ID="Table1" runat="server" Width="100%" Style="background: #c3daf9 url(../../img/tb-blue.gif) repeat-x 0 -16px;">
                                    <asp:TableRow ID="TableRow1" Width="100%" runat="server">
                                        <asp:TableCell runat="server" ID="v" Width="90%" />
                                        <asp:TableCell ID="BtConnecter" runat="server" Width="10%">
                                            <asp:LinkButton ID="LinkButton1" CssClass="lbLibelle" runat="server">Se connecter</asp:LinkButton>
                                        </asp:TableCell>
                                    </asp:TableRow>
                                </asp:Table>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="_Btconnecter" EventName="click" />
                            </Triggers>
                        </asp:UpdatePanel>
                     
                        &amp;nbsp; &amp;nbsp;
                    </Content>
                </cool:Panel>
                &amp;nbsp;<br />
                
                <br />
                <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                    <ContentTemplate>
                    <cc2:PasswordStrength ID="PasswordStrength1" runat="server" TargetControlID="_TbPassword">
                </cc2:PasswordStrength>
                        <cool:Window ID="Window1" runat="server" TriggerElement="LinkButton1" IconCls="Auth"
                            AnimateTarget="LinkButton1" AutoShow="false" Collapsible="true" Height="164px"
                            Width="250px" HideParent="True" Modal="True" CloseAction="Hide" Title="Authentification">
                            <Content>
                                <table width="236" style="height: 134px" border="0" align="center" cellpadding="0"
                                    cellspacing="0" id="Tableau_01">
                                    <tr>
                                        <td style="width: 236px">
                                            <table border="0" align="center" cellpadding="0" cellspacing="0" style="width: 206px;
                                                height: 50px">
                                                <tr>
                                                    <td style="width: 86px">
                                                        &amp;nbsp;&amp;nbsp;Login:&amp;nbsp;</td>
                                                    <td style="width: 113px">
                                                        
                                                            <asp:TextBox ID="_TbLogin" runat="server" CssClass="Style8" Columns="15" TabIndex="1"
                                                                Width="120px">test</asp:TextBox><asp:RequiredFieldValidator ID="_RFLogin" runat="server"
                                                                    ControlToValidate="_TbLogin">*</asp:RequiredFieldValidator>
                                                        
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td height="28" style="width: 86px">
                                                        &amp;nbsp;&amp;nbsp;Mot de passe:</td>
                                                    <td style="width: 113px">
                                                        
                                                            <asp:TextBox ID="_TbPassword" CssClass="Style8" runat="server" Columns="15" TabIndex="2"
                                                                TextMode="Password" Width="120px">user</asp:TextBox><asp:RequiredFieldValidator ID="_RFPassword"
                                                                    runat="server" ControlToValidate="_TbPassword">*</asp:RequiredFieldValidator>
                                                        
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="width: 86px">
                                                    </td>
                                                    <td style="width: 113px" class="tdAlignRightEntete">
                                                        <asp:Button ID="_Btconnecter" CssClass="btEntete" runat="server" Text="Connecter"
                                                            &#111;nclick="_ImBtConnecter_Click" />
                                                    </td>
                                                </tr>
                                            </table>
                                            <div align="center">
                                            
    
                                        </td>
                                    </tr>
                                </table>
                            </Content>
                        </cool:Window>
                    </ContentTemplate>
                </asp:UpdatePanel>
            
    
        </form>
  2. #2

    RE: Windows & UpdatePanel



    You should be able to set the AutoShow property to "true" when you want to Show the Window, and then set the AutoShow to "false" when you want to close. Does this work with your UpdatePanel configuration?

    There is also a .Close Method on window.

    Example

    this.Window1.Close()
    Hope this helps.
    Geoffrey McGill
    Founder
  3. #3

    RE: Windows & UpdatePanel

    Hi

    I have a very similar scenario here with a login page.
    My Login Page is using standar asp:Login with Forms Authentication:

    <html>
    <head id="Head1" runat="server">
        <title>login page</title>   
        <meta http-equiv="Pragma" content="no-cache" />
    </head>
    <body>
    
        <form id="form1" runat="server" >
        <table width="100%" style="height:100%">
            <tr>
                <td align="center" valign="top">    
                    <asp:Login ID="Login1" runat="server" OnAuthenticate="Login1_Authenticate" CreateUserText="Create New User"
                        CreateUserUrl="~/CreateAccount.aspx" PasswordRecoveryText="Forgot Password?"
                        PasswordRecoveryUrl="~/ForgotPassword.aspx">
                    </asp:Login>
                </td>
            </tr>
        </table>
        </form>
    </body>
    </html>
    Following the AutoLoad Example, the code above is the page that will be opened from my parent page using AutoLoad.

    The problem is the cool:Window is on my parent page and the user validation is done on server side of my login page above.
    I need to destroy my window only if the user is correctly authenticated.

    I tried to put &#111;nsubmit="parent.location.reload();" and it works on IE (not for FF), but it will always force close the window, even when the user informed a wrong passord.

    Cool window seems to be a simple div when I inspect using Firebug, but it opens a page as it was in a frame.
    I don't know how it works. Maybe someone with more knownledge than me can help me in this scenario.

    Someone can give me some tips, please?

    Thanks.
    Leonardo.
  4. #4

    RE: Windows & UpdatePanel

    Dear Coolite team,

    Ok. I figured out how to solve the problem.
    Thanks for your attention anyway.

    Leonardo.
  5. #5

    RE: Windows & UpdatePanel



    Hey guys,

    Sorry to bother you again, but I still may need your help in this scenario.
    I thought the problem had gone, but still happens sometimes.

    Sometimes, just in IE I am getting the message:

    ---------------------------
    Error
    ---------------------------
    A Runtime Error has occurred.
    Do you wish to Debug?


    Line: 161
    Error: 'Ext.EventObject' is null or not an object
    ---------------------------
    Yes No
    ---------------------------

    For some reason I believe that it may be related to the garbage collection routine and that's why it does not happen all the times.

    I search for this error, but I could not get any info that helped.

    Any clue?

    Thanks.

    Leonardo.

Similar Threads

  1. [CLOSED] IIS7 Windows 7 x Windows 2008
    By majunior in forum 1.x Legacy Premium Help
    Replies: 14
    Last Post: Nov 08, 2011, 6:56 PM
  2. [CLOSED] Desktop BUG: Modal windows can be minimized and you can interact with the other windows
    By juanpablo.belli@huddle.com.ar in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 31, 2009, 2:49 PM
  3. Replies: 1
    Last Post: Mar 17, 2009, 1:17 AM
  4. No Update FieldSet with UpdatePanel in Windows
    By small_soft in forum 1.x Help
    Replies: 0
    Last Post: Jul 07, 2008, 12:09 AM
  5. Replies: 1
    Last Post: Mar 29, 2008, 7:04 PM

Posting Permissions