Results 1 to 2 of 2

Thread: Update Form In Real Time

  1. #1

    Thread Starter
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Update Form In Real Time

    I have a webform that has a button. When the button is clicked, it gathers some records from a database and is supposed to update the UI with each record pulled. But for some reason, the UI only updates when the operation completes. I've posted the markup below. I can post the code if needed.

    ASP.NET Code:
    1. <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    2.         <ContentTemplate>
    3.         <p>
    4.             <asp:Button ID="btnStart" runat="server" Text="Start" Width="94px" /></p>
    5.             <table style="width: 99%;">
    6.                 <tr>
    7.                     <td class="style1">
    8.                         <asp:CheckBox ID="chkEnableCsoThread1" runat="server" Checked="True"
    9.                             Text="Enable" />
    10.                     </td>
    11.                     <td class="style2">
    12.                         <asp:Label ID="Label3" runat="server" Text="Thread 1 Progress:"></asp:Label>
    13.                     </td>
    14.                     <td class="style3">
    15.                         <asp:Label ID="lblThread1Progress" runat="server" Text="N/A"></asp:Label>
    16.                     </td>
    17.                     <td class="style4">
    18.                         <asp:Label ID="Label1" runat="server" Text="Count:"></asp:Label>
    19.                     </td>
    20.                     <td>
    21.                         <asp:Label ID="lblThread1Count" runat="server" Text="0"></asp:Label>
    22.                     </td>
    23.                 </tr>
    24.             </table>
    25.         </ContentTemplate>
    26.     </asp:UpdatePanel>
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  2. #2
    Fanatic Member
    Join Date
    Oct 1999
    Location
    England
    Posts
    982

    Re: Update Form In Real Time

    How are you populating the table?
    How many records are you retrieving?

    An update panel still does a postback to the server and so the ASP.NET engine on the server generates the html before returning it to be displayed in the browser as normal.

    Interesting read
    http://encosia.com/are-you-making-th...ajax-mistakes/

    If you want to see the table rows to be added and visible in the browser one at a time you will need to populate the table via javascript or some fully client side method.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width