Sunday, March 11, 2012

Two Timer control in the same page

when you said empty, you mean information in ContentTemplate is empty?

in this case you can do

protected void tickerTimer1_Tick(object sender, EventArgs e)
{
//update only my firt part

//Also make second empty (maybe visible = false)
}

protected void tickerTimer2_Tick(object sender, EventArgs e)
{
//update only my second part (only my gridview)

//Also make Frist empty (maybe label.Text = string.empty)
}

Hope this help


precisely not, I would like that my two contentTemplate stay full.

I would like to use 2 Timer Control with 2 separated UpdatePanel Controls.

But when my tickerTimer1 updates my contentUpdate1, I don't want that my contentUpdate2 is also updates.

And conversely when my tickerTimer2 updates my contentUpdate2, I don't want that my contentUpdate1 is also updates.


I had UpdateMode="Conditional" and now its works. Thanks Steve Marx :-)

<asp:UpdatePanel runat="server" ID="UpdatePanel2" UpdateMode="Conditional" RenderMode="Inline" >
<Triggers>
<asp:AsyncPostBackTrigger ControlID="TimerControl2" EventName="Tick" />
</Triggers>
<ContentTemplate>
my second part : gridview
</ContentTemplate>
</asp:UpdatePanel>

No comments:

Post a Comment