PostBackTrigger and UpdateProgress RRS feed

  • Question

  • User-207518206 posted

    hi everybody,

    i'm having problems with updateprogress, i'm using a Postbacktrigger to load my excel file. I tried Asyncpostback but the file upload doesn't work with that. Everythings works fine except for updateprogress. (I know it can't work with PostbackTrigger.. but i absolutely need it, cause my file is huge and it takes a long time to load. I can't use a fixed timeout). Now i'm trying to start updateprogress onclientclick but.. i don't know how to stop it! I would stop it when file upload ends. Any ideas? THANK YOU!!!!

    this is what i'm using to start Updateprogress:

    <asp:UpdatePanel runat="server" ID="updButton" >
    <asp:ImageButton runat="server" ID="provaexcel" ImageUrl="~/Images/ImmagineExcel.png"
    OnClick="provaexcel_Click" OnClientClick="postbackButtonClick()" />
    <asp:PostBackTrigger ControlID="provaexcel" />


    function postbackButtonClick() {
    updateProgress = $find("<%= UpdateProgress15.ClientID %>");
    window.setTimeout("updateProgress.set_visible(true)", updateProgress.get_displayAfter());
    return true;

    <asp:UpdatePanel runat="server" ID="provaupd15">

    <div class="indicator" id="divclassProgress15" runat="server">
    <asp:UpdateProgress ID="UpdateProgress15" runat="server" AssociatedUpdatePanelID="updButton"
    DisplayAfter="0" DynamicLayout="true">
    <table class="loading">

    <asp:Image runat="server" ID="Comm_ind12" ImageUrl="~/App_themes/common/background/indicator.gif" />
    <asp:Label CssClass="label" ID="Comm_porgress12" runat="server">
    Attendere prego ......



    Friday, January 20, 2017 11:30 AM

All replies

  • User-207518206 posted

    sorry, i forgot to say that i'm using response.end to load file: 

    Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
    "content-disposition", String.Format(System.Globalization.CultureInfo.InvariantCulture, "attachment; filename={0}", fileName));

    this.provaupd15.Visible = false;
    this.divclassProgress15.Visible = false;



    Thank you

    Friday, January 20, 2017 1:11 PM
  • User-1838255255 posted

    Hi Aurora_Boreale,

    According to your description, I know you want to show loading progress when page loading data. I think jQuery Ajax is very suit to this situation, it include BeforeSend, Success, and Complete methods etc.

    You could show progress image when you call this method, then complete call and show data, progress image hide in ajaxComplete method. For more detail about these methods, please refer to this link:

    jQuery Ajax methods: 


    About this Ajax, please refer to this sample: 

    Show Loading (Busy) Indicator (Spinner) with Overlay with jQuery AJAX example:


    Also if you want to use UpdateProgress, you could refer to this sample learn how to use:

    Display (Show) ASP.Net AJAX UpdateProgress with UpdatePanel PostBackTrigger:


    Best Regards,

    Eric Du

    Tuesday, January 24, 2017 3:28 AM