Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 16, 2012 07:24 AM by Song-Tian - MSFT
Member
8 Points
6 Posts
Aug 15, 2012 01:35 AM|LINK
Timer Event in Ajax 1.0 with VS 2005 Asp.net is not working
I just installed Ajax 1.0
Open a new project, drag and drop ScriptManager and Update Panel
then drag a label and timer control to UpdatePanel.
In Timer_Tick event i wrote Label1.text = DateTime.Now.ToString
But it is not working. Please guide me if anyone at dearteja - gmail
413 Points
222 Posts
Aug 15, 2012 03:24 AM|LINK
Did you set the trigger for the timer?
Here is an example:
http://ajax.net-tutorials.com/controls/timer-control/
All-Star
66569 Points
11265 Posts
Aug 15, 2012 04:32 AM|LINK
Hi,
For Visual Studio 2005, you need to install ASP.NET AJAX 1.0 to get the extension tab and basic AJAX features.
Please download from here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&displaylang=en
Aug 15, 2012 06:17 AM|LINK
Thanks for your reply. Yes my code is almost same. i am listing below
i too have placed the Script Manager and Update Panel after installing Ajax 1.0
<form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <asp:Timer runat="server" id="UpdateTimer" interval="5000" ontick="Timer1_Tick" /> <asp:UpdatePanel runat="server" id="TimedPanel" updatemode="Conditional"> <Triggers> <asp:AsyncPostBackTrigger controlid="UpdateTimer" eventname="Tick" /> </Triggers> <ContentTemplate> <asp:Label runat="server" id="DateStampLabel" /> </ContentTemplate> </asp:UpdatePanel> </form>
Protected Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) DateStampLabel.Text = DateTime.Now.ToString End Sub
43715 Points
4304 Posts
Microsoft
Aug 16, 2012 07:24 AM|LINK
Please refer to http://msdn.microsoft.com/en-us/library/bb398865(v=vs.100) .
Any more question, please feel free to reply.
dearteja
Member
8 Points
6 Posts
Timer Event in Ajax 1.0 with VS 2005 Asp.net is not working
Aug 15, 2012 01:35 AM|LINK
Timer Event in Ajax 1.0 with VS 2005 Asp.net is not working
I just installed Ajax 1.0
Open a new project, drag and drop ScriptManager and Update Panel
then drag a label and timer control to UpdatePanel.
In Timer_Tick event i wrote Label1.text = DateTime.Now.ToString
But it is not working. Please guide me if anyone at dearteja - gmail
Abu Dhabi
Jason Duncan
Member
413 Points
222 Posts
Re: Timer Event in Ajax 1.0 with VS 2005 Asp.net is not working
Aug 15, 2012 03:24 AM|LINK
Did you set the trigger for the timer?
Here is an example:
http://ajax.net-tutorials.com/controls/timer-control/
chetan.sarod...
All-Star
66569 Points
11265 Posts
Re: Timer Event in Ajax 1.0 with VS 2005 Asp.net is not working
Aug 15, 2012 04:32 AM|LINK
Hi,
For Visual Studio 2005, you need to install ASP.NET AJAX 1.0 to get the extension tab and basic AJAX features.
Please download from here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&displaylang=en
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
dearteja
Member
8 Points
6 Posts
Re: Timer Event in Ajax 1.0 with VS 2005 Asp.net is not working
Aug 15, 2012 06:17 AM|LINK
Thanks for your reply. Yes my code is almost same. i am listing below
i too have placed the Script Manager and Update Panel after installing Ajax 1.0
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:Timer runat="server" id="UpdateTimer" interval="5000" ontick="Timer1_Tick" />
<asp:UpdatePanel runat="server" id="TimedPanel" updatemode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger controlid="UpdateTimer" eventname="Tick" />
</Triggers>
<ContentTemplate>
<asp:Label runat="server" id="DateStampLabel" />
</ContentTemplate>
</asp:UpdatePanel>
</form>
Protected Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs)
DateStampLabel.Text = DateTime.Now.ToString
End Sub
Abu Dhabi
Song-Tian - ...
All-Star
43715 Points
4304 Posts
Microsoft
Re: Timer Event in Ajax 1.0 with VS 2005 Asp.net is not working
Aug 16, 2012 07:24 AM|LINK
Hi,
Please refer to http://msdn.microsoft.com/en-us/library/bb398865(v=vs.100) .
Any more question, please feel free to reply.
Feedback to us
Develop and promote your apps in Windows Store