在面板上添加关闭按钮 [英] Adding Close button to the panel

查看:53
本文介绍了在面板上添加关闭按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想在要用作Ajax动画扩展器目标的面板上添加一个关闭按钮,以便当客户端单击该按钮时,该面板将关闭.

我已使用此代码

Hi all,

I would like to add a close button to the panel which I am using as target for my Ajax animation Extender, so that when client clicks the button the panel gets closed.

I have used this code

<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
 </asp:ToolkitScriptManager>

 <asp:Button ID="btn_Animate" runat="server" Text="Animate" OnClientClick="return false;" />
<br />


<asp:Panel ID="panel_Animated2" runat="server" CssClass="Animation2">
              Hi this is a new animation
</asp:Panel>
      <br />
      <asp:AnimationExtender ID="AnimationExtender2" runat="server" TargetControlID="btn_Animate">

      <Animations>
          <OnClick>
              <Sequence AnimationTarget="panel_Animated2">
                  <EnableAction AnimationTarget="btn_Animate" Enabled="false" />
                      <StyleAction Attribute="display" Value="Block" />
                          <Parallel >
                              <FadeIn Duration="1" Fps="20"  />
                              <Scale Duration="1" Fps="20" ScaleFactor="30.0" Center="true" />
                              <Color PropertyKey="color" StartValue="#FFFFFF" EndValue="#660033" />
                          </Parallel>
                      </Sequence>
           </OnClick>
      </Animations>

     </asp:AnimationExtender>

推荐答案

如果您的意思是折叠,则关闭即可使用手风琴控件.否则,如果使它不可见,则可以使用几行JavaScript.

By closed if you mean collapsed then you can use the accordian control. Othewise if you to make it not visible a few lines of JavaScript will do.


("#panelDiv").hide();
("#panelDiv").hide();


这篇关于在面板上添加关闭按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆