RadAjaxLoadingPanel on c# function call

2 posts, 0 answers
  1. Peter Viau
    Peter Viau avatar
    8 posts
    Member since:
    Jan 2010

    Posted 30 Oct 2013 Link to this post

    How would I display a RadAjaxLoadingPanel on c# function call where I'm doing some table updates and close it on return?

    Note:

    The user clicks on Save or Delete button, a conformation Dialog opens and if confirmed a function is called in c# to make the necessary changes in the database.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 31 Oct 2013 Link to this post

    Hi Peter Viau,

    Please take a look into the following code snippet to show a loading panel explicitly on a button click over an asp:panel.

    ASPX:
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Panel1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1">
                    </telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <asp:Panel ID="Panel1" runat="server" CssClass="panel">
        <asp:Button ID="Button1" runat="server" Text="Loading panel" OnClick="Button1_Click">
        </asp:Button>
    </asp:Panel>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Web20"
         BackgroundPosition="Center">
    </telerik:RadAjaxLoadingPanel>

    C#:
    protected void Button1_Click(object sender, EventArgs e)
    {
        System.Threading.Thread.Sleep(2000);
    }

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top