Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to use multiple update panel in asp.net, where one update panel's content is updated on Timer tick while other update panel should be on button click.
But the problem is that , both update panels updates there content on timer tick, which I don't want.

Please help me to isolate both update panels contents updation.

[OP's answer moved to question]
C#
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
 
                <div ID="headerDiv">
 
                        Show
                  </div>
 
            <asp:LinkButton ID="lBtn_Updates" runat="server" BackColor="#CC0000"
                    CausesValidation="False" Font-Underline="False" ForeColor="White"
                    onclick="lBtn_Updates_Click">
 
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btn_search" EventName="Click"/>
            </Triggers>
 

here is the code..
 
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
 
                <div ID="headerDiv">
 
                        Show
                  </div>
                <asp:Timer ID="Timer1" runat="server" Interval="1000" ontick="Timer1_Tick">
 
            <asp:LinkButton ID="lBtn_Updates" runat="server" BackColor="#CC0000"
                    CausesValidation="False" Font-Underline="False" ForeColor="White"
                    onclick="lBtn_Updates_Click">
 
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick"/>
            </Triggers>
Posted
Updated 25-Jul-12 8:59am
v2

use Asynchronous PostBack trigger within update panel. when timer tick then update the panel. In other update panel use Asynchronous PostBack trigger. if u can share code then it's bit easy to solve.
 
Share this answer
 
Take two update panel

Now suppose updatepanel which will be updated on buttonclick is named as buttonupdatepanel.
and second updatepanel which will be updated on timerclick is named as timerupdatepanel.

For buttonupdatepanel take button1 in updatepanel

for timerupdatepanel click on timetick event and then write
C#
timerupdatepanel.updatepanel();




Your panel will be updated at each intervals.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900