Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
. (Nhận xét của một nhà phát triển trên phiên bản trước của ASP.NET murach, được đăng trực tuyến) Đã biết làm thế nào để mã trong Visual Basic 2010? Sau đó, tổng thể lập trình web với phiên bản 4. NET của cuốn sách ASP.NET đó là một yêu thích của các nhà phát triển. Nó dạy cho người mới bắt đầu | Chapter 4 How to test and debug an ASP.NET application 153 The beginning of the trace output for the Cart page The session and cookies information for the Cart page A Page directive that enables tracing for the Cart page @ Page Languages VB AutoEventWireup false CodeFile Cart.aspx.vb Inherits Cart Trace true Description The ASP.NET Trace feature traces the execution of a page and displays trace information and other information at the bottom of that page. To activate the trace feature for a page you add a Trace attribute to the Page dữective at the top of the aspx file for the page and set its value to True as shown above. The trace information is divided into several tables that provide specific types of trace information. For example the Trace Information table provides information about how the page request was processed and the Session State table provides information about the items currently stored in session state. Figure 4-13 How to enable the Trace feature and interpret Trace output Download from Wow eBook www.wowebook.com 154 Section 1 The essence ofASP.NET web programming How to create custom trace messages In some cases you may want to add your own messages to the trace information that s generated by the Trace feature. This can help you track the sequence in which the procedures of a form are executed or the changes in the data as the procedures are executed. Although you can also do this type of tracking by stepping through the procedures of a form with the debugger the trace information gives you a static listing of your messages. Note however that you can also create this type of listing using tracepoints as described earlier in this chapter. The advantage to using tracepoints is that you can generate trace information without adding code to your application. In addition this output is generated only when you run an application with debugging. In contrast you have to add program code to add custom trace messages and the trace output is generated .