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)

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

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 PageUser property is null.

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
Available since 2.0
Return to top
Show: