<DesignerAttribute(GetType(SPControlDesigner))> _ <ParseChildrenAttribute(False)> _ <SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel:=True)> _ <AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level:=AspNetHostingPermissionLevel.Minimal)> _ <SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel:=True)> _ <AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level:=AspNetHostingPermissionLevel.Minimal)> _ Public Class SPSecurityTrimmedControl Inherits WebControl Implements IDesignerEventAccessor
Dim instance As SPSecurityTrimmedControl
[DesignerAttribute(typeof(SPControlDesigner))] [ParseChildrenAttribute(false)] [SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel=true)] [AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] [SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel=true)] [AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class SPSecurityTrimmedControl : WebControl, IDesignerEventAccessor
Allows the conditional display of content depending on the user’s permission. The content can be any HTML code or other controls. One use of the SPSecurityTrimmedControl is to hide the Site Actions menu and the Publishing Console from anonymous users:
<SharePoint:SPSecurityTrimmedControl ID=”SPSecurityTrimmedControl1″ PermissionsString=”BrowseDirectories” runat=”server”> <PublishingSiteAction:SiteActionMenu runat=”server” /> <wssuc:Welcome id=”explitLogout” runat=”server” /> <PublishingWebControls:AuthoringContainer ID=”authoringcontrols” runat=”server”> <PublishingConsole:Console runat=”server” /> </PublishingWebControls:AuthoringContainer> </SharePoint:SPSecurityTrimmedControl>
You can use SPSecurityTrimmedControl to target content to annon users in a FBA site. For more information see: http://blogs.devhorizon.com/reza/?p=508
Reza Alirezaei , MVPBlog: http://blogs.devhorizon.com/reza