AnonymousTemplate Property
Collapse the table of content
Expand the table of content

LoginView::AnonymousTemplate Property

Gets or sets the template to display to users who are not logged in to the Web site.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

[BrowsableAttribute(false)]
[PersistenceModeAttribute(PersistenceMode::InnerProperty)]
[TemplateContainerAttribute(typeof(LoginView))]
public:
virtual property ITemplate^ AnonymousTemplate {
	ITemplate^ get ();
	void set (ITemplate^ value);
}
<asp:LoginView>
	<AnonymousTemplate>ITemplate</AnonymousTemplate>
</asp:LoginView>

Property Value

Type: System.Web.UI::ITemplate
The ITemplate to display.

The AnonymousTemplate property specifies the content template to display to Web site users when they are not logged in to the Web site. This template is displayed when the Name property of the Page User property is nullptr.

The AnonymousTemplate template is never displayed to authenticated users. If the AnonymousTemplate property is empty, no content is displayed to users who are not logged in.

The following code example uses the template specified in the AnonymousTemplate template to display an invitation to sign up for personalized services.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2016 Microsoft