您的位置:首页 > 编程语言 > ASP

调试Atlas:使用单独的Trace viewer跟踪调试ASP.NET页面

2006-03-22 22:13 666 查看
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

刷新页面就可以看到更新的调试信息。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息