Question about updatepanel

Last post 10-13-2006 1:42 AM by alien9882. 1 replies.

Sort Posts:

  • Question about updatepanel

    10-11-2006, 2:07 AM
    • Member
      270 point Member
    • alien9882
    • Member since 08-03-2006, 4:50 AM
    • Taiwan
    • Posts 86
    Hi,
    I got a problem about update panel.
    My scenario is that:
    I have two tasks, each of which is triggered by buttons..
    "A" needs 10 seconds to complete, and "B" needs 2 seconds.
    After clicking A button, the user click B within 10 seconds.
    Normally the program will stop doing A and start doing B, right?
    But once I use the UpdatePanel, it just keep doing A and doesn't do B.
    WHY???

    Here is my example code:
    <body>
        <form id="form1" runat="server">
            <atlas:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="True"/>
            
            <asp:Button ID="ButtonA" runat="server" Text="intensive task" />
            <asp:Button ID="ButtonB" runat="server" Text="interrupt task" /> 
            <asp:Label ID="Label2" runat="server" />
            <atlas:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <asp:Label ID="Label1" runat="server" /l>
                </ContentTemplate>
                <Triggers>
                    <atlas:ControlEventTrigger ControlID="ButtonA" EventName="Click" />
                </Triggers>
            </atlas:UpdatePanel>
            <atlas:UpdateProgress ID="UpdateProgress1" runat="server">
                <ProgressTemplate>
                    Processing...
                </ProgressTemplate>
            </atlas:UpdateProgress>
        </form>
        
    </body>
      
        Protected Sub ButtonA_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonA.Click
            System.Threading.Thread.Sleep(10000)
            Label1.Text = "Intensive task suceeded!!"
        End Sub
    
        Protected Sub ButtonB_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonB.Click
            
            Label2.Text = "Interrupted task succeeded!!"
    
        End Sub
     I need the normal function, that is to stop A and do B when clicking ButtonB, and also the function of partial refreshing. Any ideas?
  • Re: Question about updatepanel

    10-13-2006, 1:42 AM
    • Member
      270 point Member
    • alien9882
    • Member since 08-03-2006, 4:50 AM
    • Taiwan
    • Posts 86
    Could anyone give me some suggestion?
Page 1 of 1 (2 items)