DOT

VVM

 DOCS

Version: 1.0 | 1.1 |

AuthenticatedView

in namespace DotVVM.Framework.Controls

Renders different content to the users that are authenticated and users that are not.

Properties

Name Type Description Notes Default Value
AuthenticatedTemplate ITemplate Gets or sets the content displayed to the authenticated users.
attribute
inner element
static value
bindable
default
ClientIDMode ClientIDMode Gets or sets the client ID generation algorithm.
attribute
inner element
static value
bindable
default
1
DataContext Object Gets or sets a data context for the control and its children. All value and command bindings are evaluated in context of this value.
attribute
inner element
static value
bindable
default
ID String Gets or sets the unique control ID.
attribute
inner element
static value
bindable
default
InnerText String Gets or sets the inner text of the HTML element.
attribute
inner element
static value
bindable
default
NotAuthenticatedTemplate ITemplate Gets or sets the content displayed to the users that are not authenticated.
attribute
inner element
static value
bindable
default
RenderWrapperTag Boolean Gets or sets whether the control should render a wrapper element.
attribute
inner element
static value
bindable
default
False
Visible Boolean Gets or sets whether the control is visible.
attribute
inner element
static value
bindable
default
True
WrapperTagName String Gets or sets the name of the tag that wraps the Repeater.
attribute
inner element
static value
bindable
default
div

Events

Name Type Description

Usage & Scenarios

Allows to display different content to users that are authenticated and users that are not.

HTML Rendered by the Control

The control renders the contents of the AuthenticatedTemplate or NotAuthenticatedTemplate property. Optionally you can enable wrapper tag rendering using the RenderWrapperTag property. The tag name can be changed using the WrapperTagName property.

<div>
    <!-- Contents of the AuthenticatedTemplate or NotAuthenticatedTemplate -->
</div>

Sample 1: AuthenticatedView

The AuthenticatedTemplate property defines the content for users who are authenticated. The NotAuthenticatedTemplate property defines the content for users who are not authenticated.

You have to specify at least one of the templates.

<dot:AuthenticatedView>
  <AuthenticatedTemplate>
    I am authenticated.
  </AuthenticatedTemplate>
  <NotAuthenticatedTemplate>
    I am not authenticated.
  </NotAuthenticatedTemplate>
</dot:AuthenticatedView>

Suggestions


Help & Contribute

The documentation is maintained on GitHub.
We'll be happy if you edit the page and create a pull request.

Send message