Manually Activate UpdateProgress

Last post 08-29-2007 5:59 AM by Jin-Yu Yin - MSFT. 2 replies.

Sort Posts:

  • Manually Activate UpdateProgress

    08-24-2007, 10:43 AM
    • Member
      534 point Member
    • yzidell
    • Member since 07-24-2002, 1:48 PM
    • Posts 280

    I have an asp:UpdateProgress associated with an asp:UpdatePanel.

    Sometimes, the UpdateProgress control does activate.

    How do I activate it myself through code?

    Thank you

  • Re: Manually Activate UpdateProgress

    08-24-2007, 1:40 PM
    • Star
      8,978 point Star
    • dwhite
    • Member since 02-08-2007, 2:25 PM
    • Bristol, CT
    • Posts 1,422

    See this post http://forums.asp.net/t/1141653.aspx

    -Damien

    Visoft, Inc - Home | Blogs

    Latest Blog Post: Silverlight DataBinding Bug
  • Re: Manually Activate UpdateProgress

    08-29-2007, 5:59 AM
    Answer

    Hi,

    Try this: 

    prm.add_initializeRequest(InitializeRequest);
    prm.add_endRequest(EndRequest);
    var postBackElement;
    function InitializeRequest(sender, args) {
        if (prm.get_isInAsyncPostBack()) {
            args.set_cancel(true);
        }
        postBackElement = args.get_postBackElement();
        if (postBackElement.id == 'Panel1Trigger') {
            $get('UpdateProgress1').style.display = 'block';               
        }
    }
    function EndRequest(sender, args) {
        if (postBackElement.id == 'Panel1Trigger') {
            $get('UpdateProgress1').style.display = 'none';
        }
    }

    See the online documentation

    http://asp.net/ajax/documentation/live/tutorials/ProgrammingUpdateProgress.aspx

     

    Best Regards

    Sincerely,
    Jin-Yu Yin
    Microsoft Online Community Support
Page 1 of 1 (3 items)