RenderCachedOutput(System.Web.UI.HtmlTextWriter) Method

The RenderCachedOutput method of the CacheableWebPart class creates a data stream.


output A data stream.

Return Value

true if the RenderCachedOutput method successfully retrieves an HTML fragment from the cache and writes it to the output stream; otherwise, false.

If RenderCachedOutput returns true, your RenderWebPart method does not need to render any HTML. If RenderCachedOutput returns false, your RenderWebPart method needs to continue to execute and run the code that renders the actual HTML output and then call the StoreCachedOutput(System.Web.UI.HtmlTextWriter) method to save the HTML fragment in the cache.


Data cannot be changed for the period of time set by the CacheTimeout property.


Platforms: Microsoft Windows Server 2003

Security: Code Access Security