ASP.NET下,普通的调试方式是:
在<% Page ... %> 指令中添加 Trace="true" 命令。这将在页面下方显示跟踪信息。
If you are using tracing on the server to debug Web pages with partial rendering enabled (the page contains a ScriptManager control with EnablePartialRendering="true" and an UpdatePanel control with Mode="Conditional"), you should use the trace viewer (Trace.axd) to display trace output. When you append trace trace output to the end of the page, it is initially rendered, but it is not updated as a result of asynchronous postbacks, because only the contents of UpdatePanel controls that need to be refreshed will change.
然而,如果是在Altals下,使用PartialRendering功能时,页面只是部分更新,不更新整个页面,因此跟踪信息不会更新。为此,需要使用Tracer viewer来单独查看调试跟踪信息。
1. 在web.config中,添加:
<configuration>
<system.web>
<trace enabled="true"/>
</system.web>
</configuration>
2.打开应用程序根目录下的Trace.axd
刷新页面就可以看到更新的调试信息。
ASP.NET调试技巧
本文介绍在ASP.NET中如何使用Trace功能进行调试,特别是在使用Partial Rendering时如何通过Trace.axd查看完整的跟踪信息。

被折叠的 条评论
为什么被折叠?



