2015-04-12 46 views
0
沒有工作

阿賈克斯局部回傳在Firefox

<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> 

我正在parital回傳與Ajax工具包。

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(); 
     } 


    } 

當我使用Internet Explorer沒有問題,5秒鐘後它做postback.However當我使用Firefox沒有change.I與Firefox的開發工具裏面望去,只見有問題。

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 

我試圖解決有關從web.config中添加的ScriptResource.axd但這個錯誤依然存在,標籤不changing.Why做u認爲出現這種情況?問題是什麼?

回答

0

當我看着這些錯誤,我看到一些廣告軟件是問題。我使用廣告軟件清潔,這些錯誤消失了。