The last time we said configuring the config.web file, let the error message give more prompts. As light
What is the use of prompts? "The most is to know where the fault is, but I still will not change it!" Don't worry, don't
Urgent, look at what we call this article, "three-wheel ax", of course, an ax! on
The trick is not enough, we still have the following, so don't happe, and listen to me slowly.
Second: Trace Tracking
People who have used ASP should have used the following statement:
Response.write xxx
Response.end
Although I don't like ASP programming methods, this convenient debugging means is still very good. Exchange
After ASP.NET, I found that ASP.NET provides a more powerful debugging method, which is what we have to say now.
TRACE. The so-called Trace function is to add some tags in the top of the web page, as for what tag?嘿嘿
I can't tell you right away (not good, stinky eggs ... Wow!). I am saying, I have to introduce a little knowledge.
!
I don't know how much you know about the page sign of ASP.NET. For the convenience of explanation below, I still
Summary introduction! The page sign of the ASP.NET refers to the top, useful in each ASP.NET page.
Achieved statement. Its function is used to determine when processing the ASP.NET file.
Creating some special settings. The specific syntax is as follows:
Where: Directive is a page marker; Attribute is some attributes corresponding to the monolith.
Note: There is a space between the properties, and there is no space between "=".
ASP.NET now contains the following seven identifications
@Page,
@ Control,
@ Import,
@ Registe,
@ AskEMBLY,
@ OutputCache,
@ WebService
The most used is @ page, and now I want to talk about the TRACE function, but also use @ Page. (
With regard to the specific application of these seven marks, I will post it later. Ok, return to our theme. To use T
Race features, you must add: this sentence on the top: this sentence. After adding,
You can see the running of the page. Run the page. You will find a large number in the lower half of the page.
Pile of data. Let's explain the meaning of these data:
Request Details: The data read by the browser via the request mode;
Trace Information: The process information of the event or the execution of the program;
Control Tree: Class relationship between the controls and controls used by the web page;
Cookies Collection: Cookie information used by the web page;
Headers Collection: The header information of the browser.
Server Variables: Data information for Server variables.
With this big pile of data, our work is better, but it is happy, Trace also provides more powerful
Function, please look down.
In addition to let the ASP.NET page display this pile of data, we can also use the variables used in the program.
The value is displayed in the TRACE INFORMATION section, which is called TRACE.WARN or Trace.Write two
Method. Their usage is as follows:
Trace.warn ("Description", Variables);
Trace.write ("Description", Variables); I think you will ask, what is the difference between these two? The answer is: In the function, these two are exactly the same
, Just on the display, Trace.Warn will be represented by red font.