Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 958933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:56:38+00:00 2026-05-16T00:56:38+00:00

I have a page with the following caching defined: <%@ OutputCache Duration=60 VaryByParam=None %>

  • 0

I have a page with the following caching defined:

<%@ OutputCache Duration="60" VaryByParam="None" %>

I have a user control inside that page that i don’t want cached. How can I turn it off just for that control?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T00:56:39+00:00Added an answer on May 16, 2026 at 12:56 am

    Option One

    Use the Substitution control or API on your page. this enables you to cache everything on your page except the part contained within the substitution control.

    http://msdn.microsoft.com/en-us/library/ms227429.aspx

    One nice way to use this is to implement your control as a simple server control which renders the html as a string, but does so in the context of the page (that is with the correct Client IDs). Scott Guthrie has a really nice example of how this works. Works nicely with AJAX calls too by the way…

    http://weblogs.asp.net/scottgu/archive/2006/10/22/Tip_2F00_Trick_3A00_-Cool-UI-Templating-Technique-to-use-with-ASP.NET-AJAX-for-non_2D00_UpdatePanel-scenarios.aspx

    Excerpt from Scott Gu’s article…

        [WebMethod]
        public string GetCustomersByCountry(string country)
        {
           CustomerCollection customers = DataContext.GetCustomersByCountry(country);
    
            if (customers.Count > 0)
                //RenderView returns the rendered HTML in the context of the callback
                return ViewManager.RenderView("customers.ascx", customers);
            else
                return ViewManager.RenderView("nocustomersfound.ascx");
        }
    

    Option Two

    Render the dynamic control via an AJAX call on the page load. This way, you can safely cache the entire page (including the AJAX call) and it is only the rendered result of the call that changes between pages.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following page with a black canvas inside of it: There, the
I have the following page structure: <span>content01</span> <span>content02</span> <span>content03</span> <br/> <span>content04</span> <span>content05</span> <span>content06</span> <br/>
I have a page with the following two divs: <div id=searchResults> </div> <div class=postSearchOptions
On the following page I have a link and an image, the image is
What is the best method of doing the following: I have Page A with
I have a registration page with the following code below: in the views: def
I have a search page with the following scenarios listed below. I was told
I have an html page with the following content: [...] <tr><td class=n><a href=play-1.0.1.zip>play-1.0.1.zip</a></td></tr> <tr><td
I have the following HTML page and the background color for the content is
I have the following Web page: link to page . If you go to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.