This topic has not yet been rated - Rate this topic

ModelError Class

Represents an error that occurs during model binding.

System.Object
  System.Web.Mvc.ModelError

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)
[SerializableAttribute]
public class ModelError

The ModelError type exposes the following members.

  Name Description
Public method ModelError(Exception) Initializes a new instance of the ModelError class by using the specified exception.
Public method ModelError(String) Initializes a new instance of the ModelError class by using the specified error message.
Public method ModelError(Exception, String) Initializes a new instance of the ModelError class by using the specified exception and error message.
Top
  Name Description
Public property ErrorMessage Gets or sets the error message.
Public property Exception Gets or sets the exception object.
Top
  Name Description
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)
Top
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)