Where should i put a timer that call a method every 5 minutes
<p>Where should i put a timer that call a method every 5 minutes ?</p>

<p>i put it in MasterPage but call every time that i load a page that use this MasterPage but i want to call just every 5 minutes</p>

<p>i use this code in MasterPage</p>

<pre><code>&lt;body&gt;
    &lt;form id="form1" runat="server"&gt;
            &lt;div id="divNews" class="news" runat="server"&gt;&lt;/div&gt;

            &lt;asp:ScriptManager ID="ScriptManager1" runat="server" /&gt;
            &lt;asp:UpdatePanel runat="server" id="UpdatePanel" updatemode="Conditional"&gt;
                &lt;ContentTemplate&gt;
                    &lt;div class="divTit"&gt;
                        &lt;table style=" width:100%"&gt;
                            &lt;tr style=" width:100%; text-align:right;"&gt;
                                &lt;td style=" width:100%;"&gt;&lt;!--Inbox--&gt;
                                    &lt;asp:LinkButton CssClass="lblMainMenu1" runat="server" ID="lblInbox" OnClick="inbox_Click"&gt;&lt;/asp:LinkButton&gt;
                                    &lt;asp:Label Text="Inbox :" runat="server" CssClass="lblMainMenu2"&gt;&lt;/asp:Label&gt;
                                &lt;/td&gt;
                            &lt;/tr&gt;
                        &lt;/table&gt;
                    &lt;/div&gt;
                &lt;/ContentTemplate&gt;
                &lt;Triggers&gt;
                    &lt;asp:AsyncPostBackTrigger controlid="timer" EventName="Tick" /&gt;
                &lt;/Triggers&gt;
            &lt;/asp:UpdatePanel&gt;

            &lt;asp:Timer Interval="1" ID="timer" OnTick="timer_Tick" runat="server"&gt;&lt;/asp:Timer&gt;

        &lt;div id="body" class="divBody"&gt;
            &lt;asp:ContentPlaceHolder id="head" runat="server"&gt;&lt;/asp:ContentPlaceHolder&gt;
            &lt;asp:ContentPlaceHolder id="contentMain" runat="server"&gt;&lt;/asp:ContentPlaceHolder&gt;
        &lt;/div&gt;

    &lt;/form&gt;
&lt;/body&gt;
</code></pre>
