Technical Training
ASP.NET 2.0ASP.NET Configuring Page-Level Caching
ASP.NET Configuring Page-Level Caching
In this tutorial you will learn how to configure Page-Level Caching. Page directive and Duration attribute.
Ads
Configuring Page-Level Caching
1. In Visual Web Developer, switch to Design view.
2. Drag a Label control to your page, leaving the default name of Label1.
3. Switch to Design view.
4. Double-click the surface.
5. A stubbed out method will be created for you named Page_Load.
6. Add the following highlighted code to the method:
..................void Page_Load(Object sender, System.EventArgs e)
..................{
............................Label1.Text = System.DateTime.Now.ToString();
..................}
7. Press CTRL+F5 to run the page.

8. Close the browser.
Close the browser.9. Switch to Source view and add the following page directive beneath the @ Page directive:
< % @ OutputCache Duration="15" VaryByParam="none" % >
10. You are setting the page to be cached. The Duration attribute specifies that the page will remain in the cache for 15 seconds.
11. Press CTRL+F5 to run the page again.

12. Refresh the page several times.
13. Since the duration has been set to 15 seconds, the page is only refreshed after the lapse of that time.
ASP.NET 2.0
- Getting started with ASP.NET 2.0
- .NET Framework Fundamentals
- Microsoft.NET Framework Tools
- Application Development in .NET
- What's New in the .NET Framework 2.0 ?
- Introduction to Visual Studio.NET
- Installing Visual Studio.NET 2005
- Working with Visual Studio.NET Web Applications
- Whats New in ASP.NET 2.0
- Creating an ASP.NET Application
- ASP.NET Code Directory
- ASP.NET Page Object Model
- ASP.NET Server Controls
- ASP.NET Working With Master Pages
- ASP.NET Creating Content for Master Page
- ASP.NET Referencing Master Page Members
- ASP.NET Changing Master Pages Dynamically
- ASP.NET Creating Nested Master Pages
- ASP.NET Working with Web Parts
- ASP.NET Using Web Parts and Controls in Web Pages
- ASP.NET Web Pages and Layout
- ASP.NET - Adding Web Parts at Run Time
- ASP.NET Personalization: User Profiles and Themes
- ASP.NET Data Access features
- ASP.NET State Management
- ASP.NET Customizing the Session State Mechanism
- ASP.NET State Management And Caching
- ASP.NET Security
- Forms Authentication in ASP.NET
- ASP.NET Managing Membership and Roles
- ASP.NET Configuring Page-Level Caching
- ASP.NET Setting Application-Level Caching
- ASP.NET Data Source Object Model
- ASP.NET SqlDataSource Control
- ASP.NET Data Bound Controls
- ASP.NET GridView Control
- ASP.NET GridView Filtering
- ASP.NET Adding Sorting and Paging in GridView
- ASP.NET DataBound Controls - Details View
- ASP.NET Using a Grid to Display Detail Information
- ASP.NET Displaying Master-Detail Data on the Same Page
- Displaying Master-Detail Data on Separate Pages in ASP.NET
- ASP.NET Creating Web Wizards
- ASP.NET : Dynamic Image control
- ASP.NET Advanced Site Functionality







