• 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>
  • 相关阅读:
    引用 AspNetCoreRateLimit => StatusCode cannot be set because the response has already started.
    Sublime Json 格式化
    gitlab 建立本地仓库
    R语言 启动报错 *** glibc detected *** /usr/lib64/R/bin/exec/R: free(): invalid next size (fast): 0x000000000263a420 *** 错误 解决方案
    范数
    SparkR-Install
    R语言扩展包dplyr——数据清洗和整理
    R语言与机器学习学习笔记
    sparkR原理
    data.frame类型数据如何将第一列值替换为行号
  • 原文地址:https://www.cnblogs.com/zhiji6/p/1649414.html
Copyright © 2020-2023  润新知