zoukankan      html  css  js  c++  java
  • CollapsiblePanelExtender这Ajax控件

    今天做考试系统是遇到一个问题从昨晚到今天才自己摸索出来 
    ajax里面的CollapsiblePanelExtender控件控制Label显示文字(显示和隐藏)是呀设置Lable的AssociatedControlID属性为Label所在的Panel 
    下面是示例代码: <asp:ScriptManager ID="ScriptManager1" runat="server"> 
            </asp:ScriptManager> 
            <cc1:CollapsiblePanelExtender ID="CollapsiblePanelExtender1" 
            TargetControlID ="Panel1" ExpandControlID ="Panel2" 
              CollapseControlID ="Panel2" 
              Collapsed ="true" 
               TextLabelID="Label1" 
                ExpandedText ="隐藏...." 
                 CollapsedText ="显示...." 
                ImageControlID ="Image1" 
                 
               ExpandedImage ="~/images/collapse_blue.jpg"         
                CollapsedImage ="~/images/expand_blue.jpg" 
               SuppressPostBack ="true" 
               SkinID ="CollapsiblePanelDemo" 
               runat="server"> 
             
            </cc1:CollapsiblePanelExtender> 
             
       <%-- <ajaxToolkit:CollapsiblePanelExtender ID="cpeDemo" runat="Server" 
            TargetControlID="Panel1" 
            ExpandControlID="Panel2" 
            CollapseControlID="Panel2" 
            Collapsed="True" 
            TextLabelID="Label1" 
            ImageControlID="Image1"     
            ExpandedText="(Hide Details...)" 
            CollapsedText="(Show Details...)" 
            ExpandedImage="~/images/collapse_blue.jpg" 
            CollapsedImage="~/images/expand_blue.jpg" 
            SuppressPostBack="true" 
            SkinID="CollapsiblePanelDemo" />--%> 
            <asp:Panel ID="Panel2" CssClass ="collapsePanelHeader" Height ="30px" Width ="100%" runat="server"> 
                     
             
             <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" AssociatedControlID="Panel1" >(haha....)</asp:Label> 
                    </div> 
                    <div style="float: right; vertical-align: middle;"> 
                        <asp:ImageButton ID="Image1" ImageUrl="~/Images/expand_blue.jpg" AlternateText="(Show Details...)" runat="server"/> 
                    </div> 
                </div> 
                </asp:Panel> 
           <asp:Panel ID="Panel1" CssClass ="collapsePanel" Height ="0px" Width ="100%" runat="server"> 
             
             

                <p> 
                     
                    <asp:ImageButton ID="Image2" runat="server" ImageUrl="~/Images/AJAX.gif" 
                        AlternateText="ASP.NET AJAX" ImageAlign="right" /> 
                  哈哈o(∩_∩)o...哈哈 
                </p> 
           </asp:Panel>
  • 相关阅读:
    以一道CTF题目看无参数RCE
    浅谈php序列化字符串逃逸问题
    [XCTF 4th] ics-05 复现
    关于Sharp俩打印机AR-1808S和AR-2348SV的共享问题
    关于使用AdventureWorks2008示例数据库之初碰到的问题
    明日科技的SQL Server---6
    ado.net 4 step by step随书数据库
    手欠,大半个下午加一晚上就报销了。
    程序员的SQL金典
    c#读写文件
  • 原文地址:https://www.cnblogs.com/zhiji6/p/1649414.html
Copyright © 2011-2022 走看看