I am just getting started with AJAX.
I have a .Net 2.0 application with page/debug trace set to true. I have a simple page listed below. When I click the button with the page/debug trace set to true, I get an error message basically saying that trace has to be false.
Does this mean that I have to always have the page/debug trace set to true for the AJAX to work?
<asp:LabelID="Label1"runat="server"Text="Label"Width="249px"></asp:Label><br/>
<br/>
<asp:UpdatePanelID="UpdatePanel1"runat="server">
<ContentTemplate>
<hr/>
<asp:LabelID="Label2"runat="server"Text="Label"Width="249px"></asp:Label>
<hr/>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTriggerControlID="Button1"EventName="Click"/>
</Triggers>
</asp:UpdatePanel>
<br/>
<asp:LabelID="Label3"runat="server"Text="Label"Width="249px"></asp:Label><br/>
<br/>
<asp:ButtonID="Button1"runat="server"Text="Button"Width="233px"/></div>
Actually, I mean does page/debug trace always have to be set to FALSE for me to be able to use AJAX?Hi,
Yes, you can't enable trace on page for asynchronous request. That's because the response must conform to a specified format, otherwise, it will fail.
Tracing doesn't work in the UpdatePanel, it'sbasically equal to using Response.Write which is also a no-no.
-Damien