locked
UpdatePanel progress indicator RRS feed

  • Question

  • User-1826049516 posted

    Hi,

    I'm aware of the UpdateProcess control and have used it successfully in the past. But this time I would like to start and stop the progress bar using JQuery. Is this possible?

    Basically I have a LinkButton that fires the refresh of the UpdatePanel which contains an image...

    <asp:LinkButton id="Search_Button" data-action="search" data-webmethod="" Tooltip="Search" runat="server"><img src="/images/search.png" alt="Search" /></asp:LinkButton>

    When the UpdatePanel refreshes (by hitting Enter in the search box or pressing this button) I want the image to change to a spinning gif and when the refresh is complete, to turn it back to the original image.

    Full code:

    <asp:Panel id="search" DefaultButton="Search_Button" CssClass="group" data-group="search" data-zone="search" runat="server">
    	<div id="searchText">
    		<asp:TextBox id="Search_Text" Text="" AutoPostBack="False" placeholder="Search..." ValidateRequestMode="disabled" runat="server" />
    	</div>
    	<div id="searchBtns">
    		<a href="javascript:void(0);" data-action="save" data-webmethod="SaveSearch" title="Save search"><img src="/images/search-save.png" alt="Save" /></a>
    		<a href="javascript:void(0);" data-action="clear" data-webmethod="ClearSearch" title="Clear search"><img src="/images/search-clear.png" alt="Clear" /></a>
    		<a href="javascript:void(0);" data-action="recent" data-webmethod="" title="Recent searches"><img src="/images/search-recall.png" alt="Recent" /></a>
    		<asp:LinkButton id="Search_Button" data-action="search" data-webmethod="" Tooltip="Search" runat="server"><img src="/images/search.png" alt="Search" /></asp:LinkButton>
    	</div>
    </asp:Panel>
    

    Thanks

    Thursday, August 23, 2018 7:56 PM

Answers

  • User-474980206 posted
    Use the update panel lifecycle

    http://ajaxtutorials.com/general/client-side-page-life-cycle-with-updatepanel-with-javascript/
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 24, 2018 12:13 AM

All replies

  • User-474980206 posted
    Use the update panel lifecycle

    http://ajaxtutorials.com/general/client-side-page-life-cycle-with-updatepanel-with-javascript/
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 24, 2018 12:13 AM
  • User-1826049516 posted

    Thanks. I had since read about beginRequest and endRequest and that works.

    But that link you provided is more in depth and includes other functions.

    Sunday, August 26, 2018 9:14 AM