Sometimes we need to hide some elements of the page from anonymous users.
To achieve that you just need to insert this:
<SharePoint:SPSecurityTrimmedControl runat="server" AuthenticationRestrictions="AuthenticatedUsersOnly" EmitDiv="true"> HTML to hide from anonymous users </SharePoint:SPSecurityTrimmedControl>
Note: The PermissionsString attribute defines the permissions the user must have in order to view the content. See SPBasePermissions enumeration for a listing of possible values.
Comments