开发者

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 =开发者_JS百科"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>


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."
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜