Udostępnij za pośrednictwem


ValidationExtensions.ResourceClassKey Property

Gets or sets the name of the resource file (class key) that contains localized string values.

Namespace:  System.Web.Mvc.Html
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

Syntax

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

Property Value

Type: System.String
The name of the resource file (class key).

Remarks

ASP.NET MVC checks whether the ResourceClassKey property has been set and returns a value according to the following criteria:

  • If the property is not set, MVC uses the standard MVC resources.

  • If the property is set to an invalid class key (such as a resource file that does not exist), MVC throws an exception.

  • If the property is set and the class key exists but the resource names in the file do not exist in the application, MVC uses the standard MVC resources.

  • If the property is set and the specified resources are available, MVC uses the resources in the file.

See Also

Reference

ValidationExtensions Class

System.Web.Mvc.Html Namespace