<asp:Timer ID="Timer1" OnTick="Timer1_Tick" Interval="5000" runat="server"></asp:Timer>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<input id="Hidden1" type="hidden" name="Data1" value="abc" />
<asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
I am making parital postback with ajax toolkit.
protected void Timer1_Tick(object sender, EventArgs e)
{
Label2.Text = "Clicked " + DateTime.Now.ToString();
if (Application["Data"] != null)
{
string[] s;
//We know the type inside Application state so we cast it
s = (string[])Application["Data"];
StringBuilder builder = new StringBuilder();
foreach (string value in s)
{
builder.Append(value);
builder.Append('-');
}
Label1.Text = builder.ToString();
}
}
When i use internet explorer there is no problem,after 5 seconds it do postback.However when i use firefox there is no change.I looked inside with developer tools of firefox and i saw there are problems .
SyntaxError: missing ) after argument list ScriptResource.axd:5784:50
Error: ASP.NET Ajax client-side framework failed to load. Graph.aspx:42:39
ReferenceError: Type is not defined ScriptResource.axd:10:0
ReferenceError: Type is not defined ScriptResource.axd:10:0
ReferenceError: Sys is not defined Graph.aspx:55:0
ReferenceError: Sys is not defined Graph.aspx:79:0
I tried solutions about adding ScriptResource.axd from web.config but this errors still exists and labels not changing.Why do u think this happens? What is the problem?
当我查看这些错误时,我发现一些广告软件是问题所在。我使用了一个广告软件清洁程序,这些错误消失了。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.