ASP.Net 进度条有帮助吗?

发布于 2024-08-08 15:14:24 字数 141 浏览 2 评论 0原文

只是想知道是否有人知道任何可用于 ASP.Net Web 应用程序的多功能进度条的库或合适的代码?我基本上需要一个进度条,其中有一个条,例如 50%,然后是另一个网或在它上面等,显示 30%?

如果有人能提供帮助那就太好了。

提前致谢。

Just wondering if anyone knows of any libraries or decent code that is available for a multi purpose progress bar with an ASP.Net web app? I basically need a progress bar that has one bar, for example of 50%, and then another net to it or on top of it etc that shows 30%?

If anyone could help that would be brilliant.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

再可℃爱ぅ一点好了 2024-08-15 15:14:24

您想如何使用该进度条?如果要显示某些服务器端处理完成的程度,这可能是一个问题。
当您处理请求时,您无法像在 winform 应用程序中那样更新浏览器的屏幕。您必须将该处理移至单独的线程并定期查询它的处理进度。

How do you want to use that progressbar? If it is to show how far some server-side processing is completed, that can be a problem.
While you are processing a request, you can't update the screen of the browser, the way you can in a winform application. You would have to move that processing to a separate thread and periodically query how far it is.

面如桃花 2024-08-15 15:14:24
    <script type="text/javascript">
        window.onsubmit = function () {
            if (Page_IsValid) {
                var UpdateProgress1 = $find("<%= UpdateProgress1.ClientID %>");
        window.setTimeout(function () {
            UpdateProgress1.set_visible(true);
        }, 100);
    }
        }
</script>
--------------------------------------------------------------------------------------------------
<style type="text/css">
body
{
    margin: 0;
    padding: 0;
    font-family: Arial;
}
.modal1
{
    position: fixed;
    z-index: 999;
    height: 100%;
    width: 100%;
    top: 0;
    background-color: transparent;
    filter: alpha(opacity=60);
    opacity: 1;
    -moz-opacity: 0.8;
}
.center1
{
     position: relative;
    z-index: auto;
    margin: 300px auto;
    padding: 10px;
    width: 130px;
    background-color: transparent;
    border-radius: 10px;
    filter: alpha(opacity=100);
    opacity: 1;
    -moz-opacity: 1;
}
.center1 img
{
    height: 52px;
    width: 128px;
    text-align:center;
}
</style>


<asp:ScriptManager ID="ScriptManager1" runat="server">
     </asp:ScriptManager>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanelDivEdit">
            <ProgressTemplate>          
                 <div class="modal1"  align="center">
            <div class="center1"  align="center">
                <img src="Images/loader.gif" alt=""  />
                </div>
            </div>             
            </ProgressTemplate>
            </asp:UpdateProgress>

        <asp:UpdatePanel ID="UpdatePaneldivAdd" runat="server">
<ContentTemplate>

 </ContentTemplate>
<Triggers>
    <asp:PostBackTrigger ControlID="imgBtnSave" />
    <asp:PostBackTrigger ControlID="imgBtnCancel" />
</Triggers>
</asp:UpdatePanel>
    <script type="text/javascript">
        window.onsubmit = function () {
            if (Page_IsValid) {
                var UpdateProgress1 = $find("<%= UpdateProgress1.ClientID %>");
        window.setTimeout(function () {
            UpdateProgress1.set_visible(true);
        }, 100);
    }
        }
</script>
--------------------------------------------------------------------------------------------------
<style type="text/css">
body
{
    margin: 0;
    padding: 0;
    font-family: Arial;
}
.modal1
{
    position: fixed;
    z-index: 999;
    height: 100%;
    width: 100%;
    top: 0;
    background-color: transparent;
    filter: alpha(opacity=60);
    opacity: 1;
    -moz-opacity: 0.8;
}
.center1
{
     position: relative;
    z-index: auto;
    margin: 300px auto;
    padding: 10px;
    width: 130px;
    background-color: transparent;
    border-radius: 10px;
    filter: alpha(opacity=100);
    opacity: 1;
    -moz-opacity: 1;
}
.center1 img
{
    height: 52px;
    width: 128px;
    text-align:center;
}
</style>


<asp:ScriptManager ID="ScriptManager1" runat="server">
     </asp:ScriptManager>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanelDivEdit">
            <ProgressTemplate>          
                 <div class="modal1"  align="center">
            <div class="center1"  align="center">
                <img src="Images/loader.gif" alt=""  />
                </div>
            </div>             
            </ProgressTemplate>
            </asp:UpdateProgress>

        <asp:UpdatePanel ID="UpdatePaneldivAdd" runat="server">
<ContentTemplate>

 </ContentTemplate>
<Triggers>
    <asp:PostBackTrigger ControlID="imgBtnSave" />
    <asp:PostBackTrigger ControlID="imgBtnCancel" />
</Triggers>
</asp:UpdatePanel>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文