BaseValidationAttribute.MessageTemplateResourceName Property

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.

Gets or sets the name of the resource to retrieve the message template to use when logging validation results.

Namespace: Microsoft.Practices.EnterpriseLibrary.Validation.Validators
Assembly: Microsoft.Practices.EnterpriseLibrary.Validation.Silverlight (in Microsoft.Practices.EnterpriseLibrary.Validation.Silverlight.dll) Version: 5.0.505.0

Syntax

public string MessageTemplateResourceName { get; set; }
'Declaration
Public Property MessageTemplateResourceName As String
    Get
    Set
public:
property String^ MessageTemplateResourceName {
    String^ get ();
    void set (String^ value);
}

Remarks

Used in combination with MessageTemplateResourceType.

Either the MessageTemplate or the pair MessageTemplateResourceName and MessageTemplateResourceType can be used to provide a message template for the represented validator.

If both mechanisms are specified an exception occurs.

Exceptions

Exception Condition
System.InvalidOperationException when setting the value and the MessageTemplate has been set already.

See Also

BaseValidationAttribute Class

Microsoft.Practices.EnterpriseLibrary.Validation.Validators Namespace

BaseValidationAttribute.MessageTemplate

BaseValidationAttribute.MessageTemplateResourceType