RadAjaxLoadinPanel displaying when ConfirmButtonExtender is cancelled

2 posts, 0 answers
  1. Mike
    Mike avatar
    41 posts
    Member since:
    Aug 2011

    Posted 11 Mar 2014 Link to this post

    I am using a ModalPopup and ConfirmButtonExtender tied to a LinkButton inside of a RadAjaxLoadingPanel. When I click the LinkButton but cancel the confirmation, the loading panel still displays momentarily. Is there a way to suppress this when I don't go back to the server?
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 12 Mar 2014 in reply to Mike Link to this post

    Hi Robert,

    Please have a look into the sample code snippet which works fine at my end.

    ASPX:
    <asp:Label ID="Label2" runat="server" Text="">
    </asp:Label>
    <asp:LinkButton ID="btnConfirm" runat="server" Text="Show Server Time" OnClick="btnConfirm_Click">
    </asp:LinkButton>
    <ajaxToolkit:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" TargetControlID="btnConfirm" ConfirmText="Do you want to see current server time ?" ConfirmOnFormSubmit="false">
    </ajaxToolkit:ConfirmButtonExtender>
    <br />
    <br />
    <asp:Label ID="lblMessage" runat="server">
    </asp:Label><br />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnConfirm">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblMessage" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
    </telerik:RadAjaxLoadingPanel>

    C#:
    protected void Page_Load(object sender, EventArgs e)
    {
        Label2.Text = "Page Loaded Time - " + DateTime.Now.ToString();
    }
    protected void btnConfirm_Click(object sender, EventArgs e)
    {
        Thread.Sleep(1000);
        lblMessage.Text = "Current Server Time - " + DateTime.Now.ToString();
    }

    Please provide your code if it doesn't help.
    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top