Collapse problem on CollapsiblePanel

Last post 01-06-2009 1:51 AM by william83. 4 replies.

Sort Posts:

  • Collapse problem on CollapsiblePanel

    12-31-2008, 4:51 AM
    • Member
      223 point Member
    • william83
    • Member since 12-17-2007, 8:04 AM
    • Malaysia
    • Posts 117

    hi brothers,

      

                I facing a weird problem on collapsible panel.  Every time my webpage raising  postback , the collapsible panel that should be collapsed will expand a while and collapse back again. Can anyone please help me to make it collapse always even the webpage raising postback?

     Below code are the setting for collapsiblepanel .

     Thanks in advance.

    regards,

    william

    <
    cc1:CollapsiblePanelExtender ID="pnlSearch_CollapsiblePanelExtender"

    runat="server" Enabled="True" TargetControlID="pnlSearch" CollapsedSize="0"

    Collapsed="true" TextLabelID="lblSearchText" CollapsedText="Advance Search" ExpandedText="Advance Search" ExpandControlID="btnSearchImage" CollapseControlID="btnSearchImage"

    AutoCollapse="false" AutoExpand="false" EnableViewState="false" ExpandDirection="Vertical" SuppressPostBack="true" ImageControlID ="btnSearchImage" CollapsedImage="~/images/Buton/collapse.jpg" ExpandedImage="~/images/Buton/expand.jpg" >

    </cc1:CollapsiblePanelExtender>

    Thanks
    Regards
    william

    Please remember to click “Mark as Answer” on the post that helps you.
  • Re: Collapse problem on CollapsiblePanel

    12-31-2008, 5:57 AM
    • Participant
      1,098 point Participant
    • Omkar Lale
    • Member since 04-12-2007, 10:38 AM
    • India
    • Posts 193

    hi

    try with EnableViewState="true".

    Thanks & Regards,

    Omkar A. Lale

    "Courage is what it takes to stand up and speak; courage is also what it takes to sit down and listen."

    ~ Do Mark as Answer if it solves your query ~
  • Re: Collapse problem on CollapsiblePanel

    01-01-2009, 8:21 PM
    • Member
      223 point Member
    • william83
    • Member since 12-17-2007, 8:04 AM
    • Malaysia
    • Posts 117

    hi Omkar,

             i already try putting enableviewstate="true" , but the result still the same.You got any idea for that?

     

    regards,

    william

    Thanks
    Regards
    william

    Please remember to click “Mark as Answer” on the post that helps you.
  • Re: Collapse problem on CollapsiblePanel

    01-05-2009, 2:35 AM

    Hi william83,

    surround the controls with a UpdatePanel: 

    <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Test1.aspx.vb" Inherits="SoluTest_CollapsiblePanel.Test1" %>
    
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
    <!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>
        <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <asp:ScriptManager ID="ScriptManager1" runat="server" />
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <asp:Button ID="Button1" runat="server" Text="To post back" />
                    <div class="collapseContainer">
                        <asp:Image ID="btnSearchImage" runat="server" ImageAlign="Right" ImageUrl="~/Images/expand_blue.jpg" />Ajax
                        <asp:Label ID="lblSearchText" runat="server" Text="Label">(Advance Search)</asp:Label>
                        <asp:Panel ID="pnlSearch" runat="server" CssClass="collapsePanel">
                            <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/AJAX.gif" ImageAlign="Right" />
                            ASP.NET AJAX is a free framework for building a new generation of richer, more interactive,
                            highly personalized cross-browser web applications.
                        </asp:Panel>
                    </div>
                    <cc1:CollapsiblePanelExtender ID="pnlSearch_CollapsiblePanelExtender" runat="server"
                        Enabled="True" TargetControlID="pnlSearch" CollapsedSize="0" Collapsed="true"
                        TextLabelID="lblSearchText" CollapsedText="Advance Search" ExpandedText="Advance Search"
                        ExpandControlID="btnSearchImage" CollapseControlID="btnSearchImage" AutoCollapse="false"
                        AutoExpand="false" EnableViewState="true" ExpandDirection="Vertical" SuppressPostBack="true"
                        ImageControlID="btnSearchImage" CollapsedImage="~/Images/expand_blue.jpg" ExpandedImage="~/Images/collapse_blue.jpg">
                    </cc1:CollapsiblePanelExtender>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
        </form>
    </body>
    </html>
    Have my code helped?

    Best regards,

    Zhi-Qiang Ni

    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as
    Answer” if a marked post does not actually answer your question.
  • Re: Collapse problem on CollapsiblePanel

    01-06-2009, 1:51 AM
    Answer
    • Member
      223 point Member
    • william83
    • Member since 12-17-2007, 8:04 AM
    • Malaysia
    • Posts 117

    hi Zhi-Qiang Ni,

           thanks for your reply , actually my collapsiblepanel already  surround by update panel . However , I finally found the solution for this . Just put  

    Style="overflow: hidden;"   on the target panel , the panel will be hidden during the page load.

     

    thanks 

    regards,

    william

    Thanks
    Regards
    william

    Please remember to click “Mark as Answer” on the post that helps you.
Page 1 of 1 (5 items)