Quantcast
Channel: CodeProject Latest postings for ASP.NET
Viewing all articles
Browse latest Browse all 3938

AJAX Timer causes javascript error on page

$
0
0
I have an AJAX asp:Timer that when added to my LogView.aspx page causes a javascript error in the browser:
 
Expected ';'
 
Default.aspx Line: 963
CodeBlush | :O
 
First, the page that is being displayed in LogView.aspx and not Default.aspx. Also there is no javascript on my LogView.aspx page:
 
<form id="form1" runat="server">
 
<asp:ScriptManager ...>
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Timer ID="Timer1" runat="server" Interval="10000" OnTick="Timer1_Tick" />
<asp:TextBox ID="TextBox1" runat="server" Text="" />
</ContentTemplate>
</asp:UpdatePanel>
 
The code behind is:
 
protected void Timer1_Tick(object sender, EventArg e)
{
 
TextBox1.Text = "Hello";
 
}
 
Also, when run the Timer event is never called. I did a view source and the error line shows where the onLoad () System.Application.add.init(function () {$create(Sys.UI._Timer, ...
 
This is confusing. Any Ideas?
 
Thanks,
 

Steve Holdorf

Viewing all articles
Browse latest Browse all 3938


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>