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: Warnings = true indicates that ifProgramThere is something unreasonable, although it is only a warning, it is still displayed as an error, and so on. 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 already have a common logoArticleAs mentioned in, 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 configuralling </a>