asp+ Page Indicator identification

Source: Internet
Author: User
/*
Tofu production is a boutique
Http://www.asp888.net Tofu Technology Station
If reproduced please retain the full copyright information
*/
To be exact, this name is not very suitable, in asp.net the English wish Word is: Page directives.

The function of the page indicator identification is to determine what special settings the system needs to do when processing aspx files. His grammar is <%@ directive Attribute=value [Attribute=value ...] %> note the need for spaces between attributes, in the "="
Cannot have spaces between them.
ASP.net's Web Forms now contain the following 7 logo @ page,@ control,@ import,@ registe,@ assembly,@ OutputCache In fact, these logos have been mentioned in the examples in previous articles, Tofu in this article to the logo for a general agreement to explain

@ Page logo Our common attributes are Language such as <%@ page language= "VB"%&gt, and he can also determine the
of the page

Character Set, responseencoding=gb2312
Whether to allow debugging: Trace=true indicates that if the error message is displayed, otherwise the warning is displayed: Warnings=true says if there is an unreasonable place in the program, although it is only a warning, it still appears to be an error and so on

The @ Control is not used in an ASPX file, but in an ascx file, which is a file that advocates a child-defined control, and can have only one @ Control identity in an ascx file

@ Import is one of the most common identities we can use, when we use some special ASPX features, in order to tell the compiler our purpose, we need to use this identity, the common logo I have already mentioned in the previous article, if not to use @import we can already use the default Some namespaces like the following (NameSpace)
System
System.Collections
System.IO
System.Web
System.Web.UI
System.Web.UI.HtmlControls
System.Web.UI.WebControls

The @ Register is used when we call the pagelet of our child-defined component in an ASPX file, and by this token we can use our own NameSpace in this ASPX file

@ Assembly points out what additional compilers we need to use to compile the ASPX file
@ OutputCache We've just said in the previous article that the length of time that the contents of this ASPX file is kept on the server.



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.