- e
An EventArgs object that contains the event data.
The LoginView.OnPreRender(EventArgs) method is called during the System.Web.UI.Control.PreRender event to determine which content template to display to the user. If the System.Security.Principal.IIdentity.Name property of the System.Web.UI.Page System.Web.UI.Page.User property is null, the template specified in the LoginView.AnonymousTemplate property is displayed; otherwise, the template associated with the user's role is displayed. If the user does not belong to a defined role group, or if you have not configured role management, the System.Web.UI.WebControls.LoginView control displays the template specified in the LoginView.LoggedInTemplate property. For more information about configuring role management, see Role Management Providers.
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
The LoginView.OnPreRender(EventArgs) method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.