.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

View.ErrorMessages Property

Provides access to the current View‘s message collection.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v21.1.dll

Declaration

public ErrorMessages ErrorMessages { get; }

Property Value

Type Description
DevExpress.ExpressApp.Utils.ErrorMessages

An ErrorMessages object which is used to access the messages.

Remarks

Each message contains an image and text associated with a specific property name. For instance, the following code adds a message to the Subject property.

View.ErrorMessages.AddMessage(
    "Subject",
    View.CurrentObject,
    "Specifies the task subject",
    ImageLoader.Instance.GetImageInfo("Action_AboutInfo")
    );

The result in an ASP.NET and WinForms application is demonstrated below.

ErrorMessages

The ErrorMessages property is used by the Validation Module‘s ResultsHighlightController (see Built-in Controllers and Actions in Extra Modules).

See Also