gpt4 book ai didi

c# - 显示 .gif 并在访问服务器期间继续播放 - asp .net

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:46:51 24 4
gpt4 key购买 nike

我有一个按钮,我已经连接了一个 clientClick 事件处理程序和 Click(服务器)事件处理程序。在 clientClick 上,我想显示一个动画 gif,并且我希望它在访问服务器期间继续播放。目前,gif 会暂时显示,然后它的动画会“暂停”,然后重新加载页面。我希望 gif 一直播放到页面重新加载为止。

正如您可能猜到的那样 - 这样做的全部意义在于实现一个“打蛋计时器”功能,让用户了解正在发生的事情。

非常感谢,

最佳答案

您必须使用更新面板并且从服务器端您必须注册这个 document.all["slowScreenSplash"].style.display = "none";代码。

如果您使用更新面板,我已经说明了如何从服务器端注册 JS 的语法。

这比进度条的例子更棒。

<DIV ID="slowScreenSplash" STYLE="position:absolute;z-index:5;top:40%;left:15%;"
align="center">
Please wait whilst your request is being processed...
</DIV>

在按钮 clientclick 事件上调用此事件。

    document.all["slowScreenSplash"].style.display = "none";

string scriptstring = "alert('Welcome');";
ScriptManager.RegisterStartupScript(this, this.GetType(), "alertscript", scriptstring, true);

关于c# - 显示 .gif 并在访问服务器期间继续播放 - asp .net,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8430793/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com