Question

I'm using SharePoint 2010.

I have a custom user control on a publishing page layout. When an authenticated user visits a page that uses the page layout everything works fine. When an anonymous user visits a page that uses the page layout, the content that should come from the user control is not shown. After some debugging I determined that the page life-cycle events (i.e. Render and CreateChildControls) are not firing on the user control when an anonymous user visits the page.

Anyone experienced this before?

Was it helpful?

Solution

It turns out the culprit was an EditModePanel. As soon as I took the control out of the panel it worked fine. I checked and the same applies to standard server controls (e.g. TextBox), they do not render for anonymous users when inside an EditModePanel.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top