ASP.Net Progress Bar Help?
Just wondering if anyone knows o开发者_开发百科f 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.
This might help you.
jQuery.UI ProgressBar Widget
http://mattberseth.com/blog/2008/07/jqueryui_progressbar_widget.html
http://www.mattberseth2.com/demo/Default.aspx?Name=jQuery.UI+ProgressBar+Widget&Filter=jQuery
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.
<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>
精彩评论