ASP. NET learning materials 2 page instructions

Source: Internet
Author: User

List page commands that are not very familiar to you.

 

<% @ OutputCache Duration = "1" %>

Page output cache: stores the ASP. NET page content after processing in the memory. In this way, the response information is sent to the client within a certain period of time, and does not have to be processed again.

Use Cases: pages that do not change frequently, but require a large amount of processing. You can configure them in web. config.

 

Duration: Set the cache time of the page living control.

VaryByParam: When Using Cache commands on pages and controls, you must use the VaryByParam or VaryByControl attributes. If not, a analyzer error occurs. if you do not want to change the cache content by setting parameters, you can set VaryByParam to NONE. If you want to change the value of all parameters to change the output cache, you can set the attribute *

 

 

@ Assembly is used to link the Assembly to the page during compilation, so that developers can use all classes and methods exposed by the Assembly. \ below are two forms

<% @ Assembly Name = "assemblyName" %>
<% @ Assembly Src = "~ /Properties/AssemblyInfo. cs "%>

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.