locked
load custom control after page render RRS feed

  • Question

  • User-1163261216 posted

    hi.

    i have few custom controls that take some time to load,how can i make the page render all is buttons and in background the controls will do there job?

    Monday, May 9, 2011 4:44 AM

Answers

  • User3866881 posted

    Hi:)

    Without seeing your codes, It's very hard for me to tell...

    I think if you've got so many data to load with your Custom Controls, maybe you can use something like AJAX's Update Panel or JQuery's Ajax technology to deal with your problem.

    Maybe you can create an ascx Customized control, put a ScriptManger as well as an Update Panel there, and throw your other things together inside, and with an UpdataProgressBar. When the data is loading, it will fetch data from db or something else, which can let you wait for a while.

    Thx

    About more UpdateProgress with UpdatePanel, please refer to this: http://www.codeproject.com/KB/ajax/UpdateProgress.aspx

    Something codes like this:

    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
      </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="UpdateProgress1"
         AssociatedUpdatePanelID="UpdatePanel1" runat="server">
    <ProgressTemplate>Update in Progress…….. </ProgressTemplate>       <!--Well, you can put explaination words as well as flash image to show the progress for loading……-->
    </asp:UpdateProgress>

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 10, 2011 9:05 PM

All replies

  • User908166288 posted

    You can convert you control to pages and can load them Asynchronously with javascript easily. You can also use loading images for more effective UI.

    Monday, May 9, 2011 7:06 AM
  • User-1163261216 posted

    hi.

    do you have some example for this solution?

    Monday, May 9, 2011 7:10 AM
  • User3866881 posted

    Hi:)

    Without seeing your codes, It's very hard for me to tell...

    I think if you've got so many data to load with your Custom Controls, maybe you can use something like AJAX's Update Panel or JQuery's Ajax technology to deal with your problem.

    Maybe you can create an ascx Customized control, put a ScriptManger as well as an Update Panel there, and throw your other things together inside, and with an UpdataProgressBar. When the data is loading, it will fetch data from db or something else, which can let you wait for a while.

    Thx

    About more UpdateProgress with UpdatePanel, please refer to this: http://www.codeproject.com/KB/ajax/UpdateProgress.aspx

    Something codes like this:

    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
      </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="UpdateProgress1"
         AssociatedUpdatePanelID="UpdatePanel1" runat="server">
    <ProgressTemplate>Update in Progress…….. </ProgressTemplate>       <!--Well, you can put explaination words as well as flash image to show the progress for loading……-->
    </asp:UpdateProgress>

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 10, 2011 9:05 PM
  • User908166288 posted

    Hi,

    You can create handler files(.ashx) also. See this http://forums.asp.net/t/1166701.aspx/1

    You can call them asynchronously using simple jquery call $.get(). See this http://api.jquery.com/jQuery.get/

     

    hi.

    do you have some example for this solution?

    Wednesday, May 11, 2011 1:24 AM