Show Content to Anonymous Users/Hide Content from Logged in Users
A while ago I made a quick post about the SPSecurityTrimmedControl and how it can easily be used to hide any content based on permissions. (https://sharepointkb.wordpress.com/2008/09/02/hide-content-or-controls-based-on-permissions/)
Jason Coleman brought up a good question which was “How can you hide content from someone who is logged in?” (As opposed to anonymous access.) This could be used to hide registration links, sign in links, and other custom content you might have.
<SharePoint:SPSecurityTrimmedControl ID=SPSecurityTrimmedControl1 PermissionsString=CreateAlerts runat=server>
document.getElementById(“RegistrationLink“).style.display = “none”;
IMPORTANT NOTE: Of course you called also use the ASP login view control to do this as well, and this is probably recommended since it’s designed to do just that. LoginView Control: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.loginview.aspx
I am merely trying to illustrate other uses for the above control because I like it so much. 🙂
Hope this helps someone,