<asp:Panel ID="Panel2" runat="server" CssClass="collapsePanelHeader" Height="30px"> <div style="padding:5px; cursor: pointer; vertical-align: middle;"> <div style="float: left;">What is ASP.NET AJAX?</div> <div style="float: left; margin-left: 20px;"><asp:Label ID="Label1" runat="server">(Show Details)</asp:Label></div> <div style="float: right; vertical-align: middle;"><asp:Image ID="Image1" runat="server" ImageUrl="Image/expand_blue.jpg"/></div> </div> </asp:Panel> <asp:Panel ID="Panel1" runat="server" CssClass="collapsePanel" Height="0"> <br /> <p> <asp:Image ID="Image2" runat="server" ImageUrl="Image/AJAX.gif" AlternateText="ASP.NET AJAX" ImageAlign="right"/> <%= GetContentFillerText()%> ASP.NET AJAX is a free framework for building a new generation of richer, more interactive, highly personalized cross-browser web applications. This new web development technology from Microsoft integrates cross-browser client script libraries with the ASP.NET 2.0 server-based development framework. In addition, ASP.NET AJAX offers you the same type of development platform for client-based web pages that ASP.NET offers for server-based pages. And because ASP.NET AJAX is an extension of ASP.NET, it is fully integrated with server-based services. ASP.NET AJAX makes it possible to easily take advantage of AJAX techniques on the web and enables you to create ASP.NET pages with a rich, responsive UI and server communication. However, AJAX isn't just for ASP.NET. You can take advantage of the rich client framework to easily build client-centric web applications that integrate with any backend data provider and run on most modern browsers. </p> </asp:Panel> //CollapsiblePanelExtender 设置 <cc1:CollapsiblePanelExtender ID="cpeDemo" runat="Server" TargetControlID="Panel1" ExpandControlID="Panel2" CollapseControlID="Panel2" Collapsed="True" TextLabelID="Label1" ExpandedText="(Hide Details)" CollapsedText="(Show Details)" ImageControlID="Image1" ExpandedImage="Image/collapse_blue.jpg" CollapsedImage="Image/expand_blue.jpg" SuppressPostBack="true"/>