Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<asp:ScriptManager ID="ScriptManager1" runat="server">

<asp:Timer ID="TimerTime" runat="server" Interval="1000">

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<contenttemplate>
<asp:Label ID="lblDateToday" runat="server">
<asp:Label ID="lblTime" runat="server">

<triggers> <asp:AsyncPostBackTrigger ControlID="TimerTime" />



this code is on my master page
my problem is when timer refresh this master page part it will also refresh my whole child page
i want refresh only update panel part of master page
help me sir
Thank You.
Posted
Updated 29-Oct-13 2:08am
v10
Comments
Tom Marvolo Riddle 29-Oct-13 6:00am    
I suspect that you miss to include the contenttemplate inside updatepanel.Refer Solutions
Bama Boy 29-Oct-13 6:05am    
ok sir

I think you're not closing your UpdatePanel. That can probably be the cause.
 
Share this answer
 
Comments
Bama Boy 29-Oct-13 4:26am    
no sir i closed but here not display i write code but not display...if i not close than error will come
 
Share this answer
 
Your code is missing <Triggers> and <ContentTemplate> tags. I wrote the following code on masterpage, and it is working just fine.

ASP.NET
 <form runat="server">
    <asp:scriptmanager id="MasterScriptManager" runat="server" >
    </asp:scriptmanager>
 <asp:updatepanel id="UpdatePanel1" runat="server" xmlns:asp="#unknown">
            <triggers>
                <asp:asyncpostbacktrigger controlid="TimerTime" eventname="Tick" />
            </triggers>
            <contenttemplate>
                <asp:label id="lblDateToday" runat="server" />
                <asp:label id="lblTime" runat="server" />
                <asp:timer id="TimerTime" runat="server" interval="2000" ontick="Tick">
                </asp:timer>
            </contenttemplate>
        </asp:updatepanel>
</form>
Code behind:
C#
protected void Tick(object sender, EventArgs e)
{
    //Code implementation.
}
 
Share this answer
 
v2
Comments
Bama Boy 29-Oct-13 6:09am    
sir i don't forget any line but in here posting problem..... i update question but not update proper
Bama Boy 29-Oct-13 6:49am    
its refresh with child page sir

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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