Surya sasidhar
Surya sasidhar

Reputation: 30303

ajax collaps panel not working in my application?

i am going to implement the collapsiblepane in my application but it is not getting any thing just two link buttons

this is my code

CollapsiblePanelExtender ID="CollapsiblePanelExtender1"
        AutoCollapse ="False" AutoExpand ="false" ScrollContents ="true" TargetControlID ="mypanel"
         Collapsed ="true" CollapsedSize ="0" ExpandedSize ="300"
         ExpandControlID ="mylink" CollapseControlID ="mylink2"  
         CollapsedText ="Show Details..." ExpandedText ="Hide Details..."   runat="server">
        </cc1:CollapsiblePanelExtender> 



    <asp:Panel ID ="mypanel" runat ="Server" Visible ="False"  >
       <asp:TextBox ID="txt" runat ="server" ></asp:TextBox><br />
       <asp:Button ID="btn" runat ="Server" Text ="Click" />           
     </asp:Panel>  
     <asp:LinkButton ID="mylink" runat ="Server" Text ="Mydetaails" OnClick="mylink_Click" ></asp:LinkButton>
     <asp:LinkButton ID="mylink2" runat ="Server" Text ="HideMydetails" OnClick="mylink2_Click" ></asp:LinkButton>

Upvotes: 0

Views: 1300

Answers (1)

Dewfy
Dewfy

Reputation: 23614

I'm not sure but can see at least 2 problems:

  1. You server tag of CollapsiblePanelExtender must be closed, so you have:

    runat="server">

but it must be:

runat="server"/>
  1. Did you recreate CSS classes? CollapsiblePanelExtender works by manipulating styles, so these styles must be present. Also look at note from ( http://www.asp.net/AJAX/AjaxControlToolkit/Samples/CollapsiblePanel/CollapsiblePanel.aspx ) "Note: CollapsiblePanel assumes that the standard CSS box model is being used ... so please use the !DOCTYPE declaration (as found at the top of this page and enabled by default for new ASP.NET pages) to specify that the page should be rendered in IE's standards-compliant mode."

Upvotes: 1

Related Questions