Caching for master page

Posted on 2009-04-29
Last Modified: 2012-05-06
Dear experts,

I m implementing a cms site.  I have used master page with place holders to implement template. User controls are loaded on the master page depending on the data provided on the database.

I m just worried about the performance of the site since everything is loaded at runtime.
How can i implement cahching on master page level to improve performance.

Question by:bedanand
    LVL 9

    Expert Comment

    you cannot add output cache directive to master page, you need to set it programmatically.
    in the Page_Load use some thing like this

    protected void Page_Load(object sender, EventArgs e)

    Open in new window

    LVL 8

    Author Comment

    How can i set the cache for the varing querystrings values and varing session values?

    LVL 9

    Accepted Solution

    you can go a head and use simple data caching for session values... hope the below link helps you.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
    This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now