locked
Using Updatepanel to update html content of DIV element RRS feed

  • Question

  • User1806771833 posted

    I have aspx page which has 6 div panels with various real time information. Page receive this information from product API. I would like to update only 2 panels in real time and other panel in some time like every 5 min 2 and every 10 min other 2. How can I achieve this functionality using asp.net or MVC.

    Thursday, March 5, 2020 10:23 AM

All replies

  • User283571144 posted

    Hi dnyatiganesan,

    Could you please tell me which trigger you have used for the updatepanel? SIgnalr?

    If you don't use any trigger to refresh the page, I suggest  you could try to use time trigger to acheive your requirement.

    You could put a timer control in the update panel, then you could set the timer control's Interval setting.  Each updatepanel will have its own timer control with its own interval setting.

    More details, you could refer to below codes:

     <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> 
        <Triggers>
            <asp:AsyncPostBackTrigger  ControlID="Timer1" EventName="Tick" />
        </Triggers>
        <ContentTemplate> 
            <!-- your content here, no timer -->
        </ContentTemplate> 
    </asp:UpdatePanel> 
    
    <asp:Timer ID="Timer1" runat="server" Interval="5000" OnTick="Timer1_Tick">
    </asp:Timer> 

    Best Regards,

    Brando

    Monday, March 9, 2020 6:47 AM