I have an updatepanel and a timer.
I want to refresh just my updatepanel but when I put a timer inside updatepanel it doesnt work and when I put it outside my page it does.
What should I do?
<asp:UpdatePanel runat="server" ID="updLastAouction" UpdateMode="Conditional">
<ContentTemplate>
مزایده شماره : <asp:Label runat="server" ID="lbAuctionID"></asp:Label>
<br/>
<div style="margin-bottom: 10px;">
آخرین قیمت پیشنهادی :
</div>
<asp:Label runat="server" ID="lbLastOrderPrice"></asp:Label>
<div class="lastBidder">
<div style="margin-bottom: 10px;">
آخرین پیشنهاد دهنده
</div>
<asp:Label runat="server" ID="lbLastBidder">ندارد</asp:Label>
</div>
<div class="lastBidder" style="margin-top:5px;margin-bottom: 5px;">
<div class="font">
زمان باقی مانده</div>
<asp:Label runat="server" ID="lbLeftTime" Text='<%#DateTime.Now.ToLongTimeString() %>'></asp:Label>
<br/>
</div>
<asp:Button runat="server" ID="btnLastAouction" Text="برای شرکت عضو شوید"
onclick="btnLastAouction_Click"/>
</ContentTemplate>
</asp:UpdatePanel><asp:Timer ID="timerLastAouction" runat="server" Interval="1000"
OnTick="timerLastAouction_Tick" />
If the Timer is not inside of the
UpdatePanelit will cause a full postback. You could add an AsyncPostbackTigger to theUpdatePanel:Or you could wrap the Timer Control in a separate
UpdatePanelto avoid the full page postback.