Asp. NET's Trace

Source: Internet
Author: User
Tags execution session id
ASP.net afternoon, "ASPX." NET advanced programming, and then a little write impulse, such a good function should let more people know. Add <% @Page trace= "True"%&gt in the. aspx file, and then in the execution aspx file, you'll see a bit more information under the original interface, request details, trace information, control tree, Cookie collection, header collection, and server variables.

ASPX code:

private void Page_Load (object sender, System.EventArgs e)
{
Place user code here to initialize page
Trace.Write ("Trace1");
Trace.Warn ("Warn1");
Trace.Write ("Trace2");
}


The following sections of trace trace information are executed:

Category message from (s) to last (s)
Aspx.page Begin Init
Aspx.page End Init 0.001612 0.001612
Trace1 0.002763 0.001150
Warn1 0.003155 0.000393
Trace2 0.003240 0.000085
Aspx.page Begin PreRender 0.003287 0.000047
Aspx.page End PreRender 0.003331 0.000044
Aspx.page Begin saveviewstate 0.003636 0.000305
Aspx.page End SaveViewState 0.004491 0.000856
Aspx.page Begin Render 0.004559 0.000068
Aspx.page End Render 0.051202 0.046643

Yes, even the execution time has been lost.

After looking at the cookie information of trace output, and then the session ID, the value is the same, it seems to be true that ASP.net is implemented with cookies!




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.