DefaultModelBinder.ResourceClassKey Property

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

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

'Declaration
Public Shared Property ResourceClassKey As String 
	Get 
	Set
'Usage
Dim value As String 

value = DefaultModelBinder.ResourceClassKey 

DefaultModelBinder.ResourceClassKey = value

Property Value

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

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.

Show: