【问题标题】:ModalPopupExtender Animations OnShownModalPopupExtender 动画 OnShown
【发布时间】:2013-02-04 04:37:58
【问题描述】:

我正在学习 ASP .NET 并遇到了模态弹出扩展器。我发现使用模态弹出窗口可以制作动画,但我对 OnShowing 和 OnShown 标签之间的区别有疑问。谷歌搜索给了我

OnShowing – Called before the modal popup is shown.
OnShown – Called after the modal popup is shown.
OnHiding – Called before the modal popup is hidden.
OnHidden – Called after the modal popup is hidden.

但是,我对某些事情感到困惑。当我点击目标按钮并使用 OnShowing 时,没有动画效果。但是当我使用 OnShown 时,动画是成功的。现在,在显示模式弹出窗口之前不是调用 OnShowing 吗,所以当我单击目标按钮时,应该调用的是函数 OnShowing。我想我在这里遗漏了一些东西。感谢您的帮助!

【问题讨论】:

  • 它类似于天气 html 是否加载。 OnShowing 表示它启动了事件但未创建 html。onshown 表示已创建 html。其他两个事件类似

标签: c# asp.net asp.net-ajax


【解决方案1】:

你检查过这个 [AnimationExtender with ModalPopup] (http://forums.asp.net/p/1318051/2624063.aspx#2624063) 吗?他们为 ModalPopUpExtender Animations 提供了一个非常好的示例。它会让你真正理解你的担忧。

希望对您有所帮助。

【讨论】:

    【解决方案2】:

    尝试通过在 onshowing 函数上添加 return true; 来返回 true

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-02
      • 1970-01-01
      • 2011-02-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多