locked
Response.write and partial page caching question RRS feed

  • Question

  • User44285324 posted

    I was playing around with caching today and I noticed that if you use a Response.Write statement from the code-behind of a user-control that has output caching enabled it will not cache the Response.Write output. On the other hand if I store a value into a public variable in a user-control and then in the markup use <% Response.Write(var-name); %> it caches it. What is the difference?      

    Monday, May 19, 2008 5:49 PM

All replies

  • User-1949782799 posted

    I believe that only the result of the Render method is cached.
    The markup is also returned from the Render method, any Response.Write calls made in the code-behind (other than in the Render method) will not be a part of the Render result.

    Friday, June 27, 2008 5:46 AM