Ok. This is a big one. I\'ll try and explain my issue but let me know if you need more info.
I would like to alter the HTML that SharePoint 2010 generates. I\'m going t
The problem is caused by something in the page interfering with the outputcache during render, and more specifically the behaviour of the PostCacheSubstitutionTextHelper class. Probably your call to Render above triggers this.
The welcome.asxc control behaves approximately like this (pseudo sequence diagram):
Page Render > Welcome.ascx Render > PersonalActions Render > PostCacheSubstitutionText.Render > PostCacheSubstitutionTextHelper.RenderAndRegisterSubstitutionCallbackHandler (new instance of)PostCacheSubstitutionText.Render(called in delegate and now writes to HtmlTextWriter) > PostCacheSubstitutionTextHelper. RenderAndRegisterSubstitutionCallbackHandler HttpContext.Response.WriteSubstitution(stuffFromNewInstanceOfPostCacheSubstitutionText)
So enough with the sharepoint freakshow and over to the workaround:-)
Try adding this to your welcome.ascx in the hive:
// in bottom of directives in /CONTROLTEMPLATES/Welcome.ascx
<%@ OutputCache Duration="1" VaryByParam="none" %>
Notice that the Duration is set to 1 since 0 is not allowed for user controls. this leaves a theoretical possiblity for failure, but in our scenario it worked.
I ran into this same problem, I was able to workaround the issue by removing this line from the masterpage.
<wssuc:Welcome id="IdWelcome" runat="server">
</wssuc:Welcome>