Http://www.asp888.net bean curd technology station
Specifically, this name is not very suitable. In asp.net, the word "Page ctictives" is used.
The page indication mark function is used to determine what special settings do the system need when processing the aspx file? His
The syntax is <% @ directive attribute = value [attribute = value... ] %> Note that spaces are required between attributes"
There cannot be spaces between them.
The web forms of asp.net now contains the following 7 identifiers
@ Page, @ Control, @ Import, @ Registe, @ Assembly, @ OutputCache
In fact, these identifiers have been mentioned in previous articles. In this article, tofu creates
General consent
@ Page: the commonly used attribute is Language, for example, <% @ Page Language = "VB" %>. In addition, he can determine this
Page
Character Set, ResponseEncoding = gb2312
Allow debugging: Trace = True indicates that if an error is returned, the error message is displayed. Otherwise
Warning display: Warnings = True indicates that if there is anything unreasonable in the program, even though it is only a warning, it is still displayed as an error
And so on.
@ Control is not used in the aspx file, but in the ascx file, that is, in a file that supports sub-definition controls
The ascx file can have only one @ Control identifier.
@ Import is the most commonly used identifier. When we use some special aspx features
Purpose, we need to use this identifier. I have already mentioned the commonly used identifier in the previous article. If we do not use @ import
By default, the following namespaces can be used)
System
System. Collections
System. IO
System. Web
System. Web. UI
System. Web. UI. HtmlControls
System. Web. UI. WebControls
@ Register: When we call the pagelet of our sub-definition component in the aspx file, perform table injection on this pagelet.
We can use our own NameSpace in this aspx file.
@ Assembly indicates what additional compiler should be used to compile the aspx File
@ OutputCache the length of time the content of this aspx file was retained on the server as we mentioned in the previous article.