The page indication mark function is used to determine what special settings do the system need when processing the aspx file? Its syntax is:
<% @ Directive attribute = value %> For example: <% import namespace = "System. Data" %>
Note that space is required between attributes, and no space is allowed between "=.
The web forms of asp.net now contains the following seven identifiers:
@ Page, @ Control, @ Import, @ Registe, @ Assembly, @ OutputCache
@ Page: the commonly used attribute is Language, for example, <% @ Page Language = "VB" %>;
In addition, he can determine the character set of this page, ResponseEncoding = gb2312;
Allow debugging: Trace = True indicates that if an error is received, the error message is displayed; otherwise, the opposite is displayed;
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. For specific applications, see ASP. NET Chinese display solutions.
@ Control is not used in the aspx file, but in the ascx file, that is, the file that supports the sub-definition Control can only have one @ Control identifier in an ascx file.
@ Import is the most commonly used identifier. When we use some special aspx features, we need to use this identifier to tell the compiler what we want, I have already mentioned common identifiers in the previous article. If @ import is not used, we can use the following namespaces by default)
System
System. Collections
System. IO
System. Web
System. Web. UI
System. Web. UI. HtmlControls
System. Web. UI. WebControls
@ Register: This ID is used when we call the pagelet of our sub-definition component in the aspx file and Register this pagelet, we can use our own NameSpace in this aspx file.
@ Assembly refers to the additional compiler used to compile the aspx file. The usage is as follows:
<% @ Assembly src = "DocName" %> src points to a file suffixed with cs or vb, which will include the CLASS in these files into the current page.
@ OutputCache. The length of time for the content of the aspx file to be retained on the server (connection ......)
<% @ OutputCache duration = "1000" %>
The Cache retention time defined here is 1000 seconds.
@ Webservice refers to a WebService class. The usage is as follows:
<% @ WebService Language = "language" Class = "classname" %>
<A href = "http://www.gotdotnet.com/quickstart/aspplus/"> Web Service Type discovery alling </a>