asp.net4.0 All page Instructions

Source: Internet
Author: User

Asp. NET Web page directive (page Directive) is the label declaration at the beginning of the page:

<% page language= "C #"%>

The purpose of the directive is to specify the settings that are used by the Web page and the user control compiler to process the ASP. NET Web Form Web page (. aspx file) and user control (. ascx) files. The following table is all instructions for asp.net4.0.

asp.net4.0 Directive
Instructions Description
@Master Identify a Web page as the primary page (the master page) and define properties for the ASP. NET Web page Profiler and compiler that can only be included in the. Master file
@MasterType Defines the class or virtual path used to enter the master property of a Web page
@Register Associating aliases (alias) with namespaces and classes allows user controls and custom server controls to be rendered when they are contained in a required web page or user space
@OutputCache Declaratively control the output cache principle for a Web page or user control
@Import Explicitly import namespaces to Web pages or user controls
@Control Define specific control properties that can be used by the ASP. NET Web page Profiler and the editor and can only join. ascx files (user controls)
@Reference To link a Web page, user control, or COM control to the current Web page or user control declaratively
@WebHandler Defining properties and compilation options for an HTTP handler (. ashx) file
@PreviousPageType Establish a strongly typed reference to the target source page of a cross-page send
@Assembly To link a component to the current page or user control declaratively
@Implements Declaratively representing a Web page or user control implements the specified. NET Framework Interface
@Page Define a specific page property that can be used by the ASP. NET Web page Profiler and the editor and can only join. ascx files

These directives have specific companion applications, such as the main page, which uses the @master directive, which uses the @previouspagetype directive, which itself contains a lot of attributes, and if you want to learn more, check the MSDN Library online Help file. Fortunately, in most cases, we do not need to manually add these instructions, because Visual Studio joins automatically, but if you encounter situations where you need to manually join yourself, simply query their usage in the online Help file.

Asp. NET Directive Syntax:

Http://msdn.microsoft.com/zh-tw/library/xz702w3e.aspx

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.