System.Web.Mvc Namespace

The System.Web.Mvc namespace contains classes and interfaces that support the ASP.NET Model View Controller (MVC) framework for creating Web applications. This namespace includes classes that represent controllers, controller factories, action results, views, partial view, model binders, and much more.

Classes
  ClassDescription
Public class AcceptVerbsAttributeRepresents an attribute that specifies which HTTP verbs an action method will respond to.
Public class ActionDescriptorProvides information about an action method, such as its name, controller, parameters, attributes, and filters.
Public class ActionExecutedContextProvides the context for the ActionExecuted method of the ActionFilterAttribute class.
Public class ActionExecutingContextProvides the context for the ActionExecuting method of the ActionFilterAttribute class.
Public class ActionFilterAttributeRepresents the base class for filter attributes.
Public class ActionMethodSelectorAttributeRepresents an attribute that is used to influence the selection of an action method.
Public class ActionNameAttributeRepresents an attribute that is used for the name of an action.
Public class ActionNameSelectorAttributeRepresents an attribute that affects the selection of an action method.
Public class ActionResultRepresents the result of an action method.
Public class AdditionalMetadataAttributeProvides a class that implements the IMetadataAware interface in order to support additional metadata.
Public class AjaxHelperRepresents support for rendering HTML in AJAX scenarios within a view.
Public class AjaxHelperTModelRepresents support for rendering HTML in AJAX scenarios within a strongly typed view.
Public class AjaxRequestExtensionsRepresents a class that extends the HttpRequestBase class by adding the ability to determine whether an HTTP request is an AJAX request.
Public class AllowAnonymousAttributeRepresents an attribute that marks controllers and actions to skip the AuthorizeAttribute during authorization.
Public class AllowHtmlAttributeAllows a request to include HTML markup during model binding by skipping request validation for the property. (It is strongly recommended that your application explicitly check all models where you disable request validation in order to prevent script exploits.)
Public class AreaRegistrationProvides a way to register one or more areas in an ASP.NET MVC application.
Public class AreaRegistrationContextEncapsulates the information that is required in order to register an area within an ASP.NET MVC application.
Public class AssociatedMetadataProviderProvides an abstract class to implement a metadata provider.
Public class AssociatedValidatorProviderProvides an abstract class for classes that implement a validation provider.
Public class AsyncControllerProvided for backward compatibility with ASP.NET MVC 3.
Public class AsyncTimeoutAttributeRepresents an attribute that is used to set the timeout value, in milliseconds, for an asynchronous method.
Public class AuthorizationContextEncapsulates the information that is required for using an AuthorizeAttribute attribute.
Public class AuthorizeAttributeSpecifies that access to a controller or action method is restricted to users who meet the authorization requirement.
Public class BindAttributeRepresents an attribute that is used to provide details about how model binding to a parameter should occur.
Public class BuildManagerCompiledViewRepresents the base class for views that are compiled by the BuildManager class before being rendered by a view engine.
Public class BuildManagerViewEngineProvides a base class for view engines.
Public class ByteArrayModelBinderMaps a browser request to a byte array.
Public class CachedAssociatedMetadataProviderTModelMetadataProvides an abstract class to implement a cached metadata provider.
Public class CachedDataAnnotationsMetadataAttributesProvides a container to cache System.ComponentModel.DataAnnotations attributes.
Public class CachedDataAnnotationsModelMetadataProvides a container to cache DataAnnotationsModelMetadata.
Public class CachedDataAnnotationsModelMetadataProviderImplements the default cached model metadata provider for ASP.NET MVC.
Public class CachedModelMetadataTPrototypeCacheProvides a container for cached metadata.
Public class CancellationTokenModelBinderProvides a mechanism to propagates notification that model binder operations should be canceled.
Public class ChildActionOnlyAttributeRepresents an attribute that is used to indicate that an action method should be called only as a child action.
Public class ChildActionValueProviderRepresents a value provider for values from child actions.
Public class ChildActionValueProviderFactoryRepresents a factory for creating value provider objects for child actions.
Public class ClientDataTypeModelValidatorProviderReturns the client data-type model validators.
Public class CompareAttributeObsolete. Provides an attribute that compares two properties of a model.
Public class ContentResultRepresents a user-defined content type that is the result of an action method.
Public class ControllerProvides methods that respond to HTTP requests that are made to an ASP.NET MVC Web site.
Public class ControllerActionInvokerRepresents a class that is responsible for invoking the action methods of a controller.
Public class ControllerBaseRepresents the base class for all MVC controllers.
Public class ControllerBuilderRepresents a class that is responsible for dynamically building a controller.
Public class ControllerContextEncapsulates information about an HTTP request that matches specified RouteBase and ControllerBase instances.
Public class ControllerDescriptorEncapsulates information that describes a controller, such as its name, type, and actions.
Public class ControllerInstanceFilterProviderAdds the controller to the FilterProviderCollection instance.
Public class CustomModelBinderAttributeRepresents an attribute that invokes a custom model binder.
Public class DataAnnotationsModelMetadataProvides a container for common metadata, for the DataAnnotationsModelMetadataProvider class, and for the DataAnnotationsModelValidator class for a data model.
Public class DataAnnotationsModelMetadataProviderImplements the default model metadata provider for ASP.NET MVC.
Public class DataAnnotationsModelValidatorProvides a model validator.
Public class DataAnnotationsModelValidatorTAttributeProvides a model validator for a specified validation type.
Public class DataAnnotationsModelValidatorProviderImplements the default validation provider for ASP.NET MVC.
Public class DataErrorInfoModelValidatorProviderProvides a container for the error-information model validator.
Public class DefaultControllerFactoryRepresents the controller factory that is registered by default.
Public class DefaultModelBinderMaps a browser request to a data object. This class provides a concrete implementation of a model binder.
Public class DefaultViewLocationCacheRepresents a memory cache for view locations.
Public class DependencyResolverProvides a registration point for dependency resolvers that implement IDependencyResolver or the Common Service Locator IServiceLocator interface.
Public class DependencyResolverExtensionsProvides a type-safe implementation of GetService and GetServices.
Public class DictionaryValueProviderTValueRepresents the base class for value providers whose values come from a collection that implements the IDictionaryTKey, TValue interface.
Public class EmptyModelMetadataProviderProvides an empty metadata provider for data models that do not require metadata.
Public class EmptyModelValidatorProviderProvides an empty validation provider for models that do not require a validator.
Public class EmptyResultRepresents a result that does nothing, such as a controller action method that returns nothing.
Public class ExceptionContextProvides the context for using the HandleErrorAttribute class.
Public class ExpressionHelperProvides a helper class to get the model name from an expression.
Public class FieldValidationMetadataProvides a container for client-side field validation metadata.
Public class FileContentResultSends the contents of a binary file to the response.
Public class FilePathResultSends the contents of a file to the response.
Public class FileResultRepresents a base class that is used to send binary file content to the response.
Public class FileStreamResultSends binary content to the response by using a Stream instance.
Public class FilterRepresents a metadata class that contains a reference to the implementation of one or more of the filter interfaces, the filter's order, and the filter's scope.
Public class FilterAttributeRepresents the base class for action and result filter attributes.
Public class FilterAttributeFilterProviderDefines a filter provider for filter attributes.
Public class FilterInfoEncapsulates information about the available action filters.
Public class FilterProviderCollectionRepresents the collection of filter providers for the application.
Public class FilterProvidersProvides a registration point for filters.
Public class FormCollectionContains the form value providers for the application.
Public class FormContextEncapsulates information that is required in order to validate and process the input data from an HTML form.
Public class FormValueProviderRepresents a value provider for form values that are contained in a NameValueCollection object.
Public class FormValueProviderFactoryRepresents a class that is responsible for creating a new instance of a form-value provider object.
Public class GlobalFilterCollectionRepresents a class that contains all the global filters.
Public class GlobalFiltersRepresents the global filter collection.
Public class HandleErrorAttributeRepresents an attribute that is used to handle an exception that is thrown by an action method.
Public class HandleErrorInfoEncapsulates information for handling an error that was thrown by an action method.
Public class HiddenInputAttributeRepresents an attribute that is used to indicate whether a property or field value should be rendered as a hidden input element.
Public class HtmlHelperSupports the rendering of HTML controls in a view.
Public class HtmlHelperTModelRepresents support for rendering HTML controls in a strongly typed view.
Public class HttpDeleteAttributeRepresents an attribute that is used to restrict an action method so that the method handles only HTTP DELETE requests.
Public class HttpFileCollectionValueProviderRepresents a value provider to use with values that come from a collection of HTTP files.
Public class HttpFileCollectionValueProviderFactoryRepresents a class that is responsible for creating a new instance of an HTTP file collection value provider object.
Public class HttpGetAttributeRepresents an attribute that is used to restrict an action method so that the method handles only HTTP GET requests.
Public class HttpHeadAttributeSpecifies that the HTTP request must be the HTTP HEAD method.
Public class HttpNotFoundResultDefines an object that is used to indicate that the requested resource was not found.
Public class HttpOptionsAttributeRepresents an attribute that is used to restrict an action method so that the method handles only HTTP OPTIONS requests.
Public class HttpPatchAttributeRepresents an attribute that is used to restrict an action method so that the method handles only HTTP PATCH requests.
Public class HttpPostAttributeRepresents an attribute that is used to restrict an action method so that the method handles only HTTP POST requests.
Public class HttpPostedFileBaseModelBinderBinds a model to a posted file.
Public class HttpPutAttributeRepresents an attribute that is used to restrict an action method so that the method handles only HTTP PUT requests.
Public class HttpRequestExtensionsExtends the HttpRequestBase class that contains the HTTP values that were sent by a client during a Web request.
Public class HttpStatusCodeResultProvides a way to return an action result with a specific HTTP response status code and description.
Public class HttpUnauthorizedResultRepresents the result of an unauthorized HTTP request.
Public class JavaScriptResultSends JavaScript content to the response.
Public class JQueryFormValueProviderThe JQuery Form Value provider is used to handle JQuery formatted data in request Forms.
Public class JQueryFormValueProviderFactoryProvides the necessary ValueProvider to handle JQuery Form data.
Public class JsonResultRepresents a class that is used to send JSON-formatted content to the response.
Public class JsonValueProviderFactoryEnables action methods to send and receive JSON-formatted text and to model-bind the JSON text to parameters of action methods.
Public class LinqBinaryModelBinderMaps a browser request to a LINQ Binary object.
Public class MaxLengthAttributeAdapterProvides an adapter for the MaxLengthAttribute attribute.
Public class MinLengthAttributeAdapterProvides an adapter for the MinLengthAttribute attribute.
Public class ModelBinderAttributeRepresents an attribute that is used to associate a model type to a model-builder type.
Public class ModelBinderDictionaryRepresents a class that contains all model binders for the application, listed by binder type.
Public class ModelBinderProviderCollectionNo content here will be updated; please do not add material here.
Public class ModelBinderProvidersProvides a container for model binder providers.
Public class ModelBindersProvides global access to the model binders for the application.
Public class ModelBindingContextProvides the context in which a model binder functions.
Public class ModelErrorRepresents an error that occurs during model binding.
Public class ModelErrorCollectionA collection of ModelError instances.
Public class ModelMetadataProvides a container for common metadata, for the ModelMetadataProvider class, and for the ModelValidator class for a data model.
Public class ModelMetadataProviderProvides an abstract base class for a custom metadata provider.
Public class ModelMetadataProvidersProvides a container for the current ModelMetadataProvider instance.
Public class ModelStateEncapsulates the state of model binding to a property of an action-method argument, or to the argument itself.
Public class ModelStateDictionaryRepresents the state of an attempt to bind a posted form to an action method, which includes validation information.
Public class ModelValidationResultProvides a container for a validation result.
Public class ModelValidatorProvides a base class for implementing validation logic.
Public class ModelValidatorProviderProvides a list of validators for a model.
Public class ModelValidatorProviderCollectionNo content here will be updated; please do not add material here.
Public class ModelValidatorProvidersProvides a container for the current validation provider.
Public class MultiSelectListRepresents a list of items that users can select more than one item from.
Public class MvcFilterWhen implemented in a derived class, provides a metadata class that contains a reference to the implementation of one or more of the filter interfaces, the filter's order, and the filter's scope.
Public class MvcHandlerSelects the controller that will handle an HTTP request.
Public class MvcHtmlStringRepresents an HTML-encoded string that should not be encoded again.
Public class MvcHttpHandlerVerifies and processes an HTTP request.
Public class MvcRouteHandlerCreates an object that implements the IHttpHandler interface and passes the request context to it.
Public class MvcWebRazorHostFactoryCreates instances of MvcWebPageRazorHost files.
Public class NameValueCollectionExtensionsExtends a NameValueCollection object so that the collection can be copied to a specified dictionary.
Public class NameValueCollectionValueProviderRepresents the base class for value providers whose values come from a NameValueCollection object.
Public class NoAsyncTimeoutAttributeProvides a convenience wrapper for the AsyncTimeoutAttribute attribute.
Public class NonActionAttributeRepresents an attribute that is used to indicate that a controller method is not an action method.
Public class OutputCacheAttributeRepresents an attribute that is used to mark an action method whose output will be cached.
Public class OverrideActionFiltersAttributeRepresents the attributes associated with the override filter.
Public class OverrideAuthenticationAttributeRepresents the attributes associated with the authentication.
Public class OverrideAuthorizationAttributeRepresents the attributes associated with the authorization.
Public class OverrideExceptionFiltersAttributeRepresents the attributes associated with the exception filter.
Public class OverrideResultFiltersAttributeRepresents the attributes associated with the result filter.
Public class ParameterBindingInfoEncapsulates information for binding action-method parameters to a data model.
Public class ParameterDescriptorContains information that describes a parameter.
Public class PartialViewResultRepresents a base class that is used to send a partial view to the response.
Public class PreApplicationStartCodeProvides a registration point for ASP.NET Razor pre-application start code.
Public class QueryStringValueProviderRepresents a value provider for query strings that are contained in a NameValueCollection object.
Public class QueryStringValueProviderFactoryRepresents a class that is responsible for creating a new instance of a query-string value-provider object.
Public class RangeAttributeAdapterProvides an adapter for the RangeAttribute attribute.
Public class RazorViewRepresents the class used to create views that have Razor syntax.
Public class RazorViewEngineRepresents a view engine that is used to render a Web page that uses the ASP.NET Razor syntax.
Public class RedirectResultControls the processing of application actions by redirecting to a specified URI.
Public class RedirectToRouteResultRepresents a result that performs a redirection by using the specified route values dictionary.
Public class ReflectedActionDescriptorContains information that describes a reflected action method.
Public class ReflectedControllerDescriptorContains information that describes a reflected controller.
Public class ReflectedParameterDescriptorContains information that describes a reflected action-method parameter.
Public class RegularExpressionAttributeAdapterProvides an adapter for the RegularExpressionAttribute attribute.
Public class RemoteAttributeProvides an attribute that uses the jQuery validation plug-in remote validator.
Public class RequiredAttributeAdapterProvides an adapter for the RequiredAttributeAttribute attribute.
Public class RequireHttpsAttributeRepresents an attribute that forces an unsecured HTTP request to be re-sent over HTTPS.
Public class ResultExecutedContextProvides the context for the OnResultExecuted method of the ActionFilterAttribute class.
Public class ResultExecutingContextProvides the context for the OnResultExecuting method of the ActionFilterAttribute class.
Public class RouteAreaAttributeDefines the area to set for all the routes defined in this controller.
Public class RouteAttributePlace on a controller or action to expose it directly via a route. When placed on a controller, it applies to actions that do not have any System.Web.Mvc.RouteAttribute’s on them.
Public class RouteCollectionAttributeRoutingExtensionsProvides routing extensions for route collection attribute.
Public class RouteCollectionExtensionsExtends a RouteCollection object for MVC routing.
Public class RouteDataValueProviderRepresents a value provider for route data that is contained in an object that implements the IDictionaryTKey, TValue interface.
Public class RouteDataValueProviderFactoryRepresents a factory for creating route-data value provider objects.
Public class RoutePrefixAttributeAnnotates a controller with a route prefix that applies to all actions within the controller.
Public class SelectListRepresents a list that lets users select one item.
Public class SelectListGroupRepresents the optgroup HTML element and its attributes. In a select list, multiple groups with the same name are supported. They are compared with reference equality.
Public class SelectListItemRepresents the selected item in an instance of the SelectList class.
Public class SessionStateAttributeSpecifies the session state of the controller.
Public class SessionStateTempDataProviderProvides session-state data to the current TempDataDictionary object.
Public class StringLengthAttributeAdapterProvides an adapter for the StringLengthAttribute attribute.
Public class TempDataDictionaryRepresents a set of data that persists only from one request to the next.
Public class TemplateInfoEncapsulates information about the current template context.
Public class UrlHelperContains methods to build URLs for ASP.NET MVC within an application.
Public class UrlParameterRepresents an optional parameter that is used by the MvcHandler class during routing.
Public class ValidatableObjectAdapterProvides an object adapter that can be validated.
Public class ValidateAntiForgeryTokenAttributeRepresents an attribute that is used to prevent forgery of a request.
Public class ValidateInputAttributeRepresents an attribute that is used to mark action methods whose input must be validated.
Public class ValueProviderCollectionRepresents the collection of value-provider objects for the application.
Public class ValueProviderDictionaryObsolete. Note: This API is now obsolete.Represents a dictionary of value providers for the application.
Public class ValueProviderFactoriesRepresents a container for value-provider factory objects.
Public class ValueProviderFactoryRepresents a factory for creating value-provider objects.
Public class ValueProviderFactoryCollectionRepresents the collection of value-provider factories for the application.
Public class ValueProviderResultRepresents the result of binding a value (such as from a form post or query string) to an action-method argument property, or to the argument itself.
Public class ViewContextEncapsulates information that is related to rendering a view.
Public class ViewDataDictionaryRepresents a container that is used to pass data between a controller and a view.
Public class ViewDataDictionaryTModelRepresents a container that is used to pass strongly typed data between a controller and a view.
Public class ViewDataInfoEncapsulates information about the current template content that is used to develop templates and about HTML helpers that interact with templates.
Public class ViewEngineCollectionRepresents a collection of view engines that are available to the application.
Public class ViewEngineResultRepresents the result of locating a view engine.
Public class ViewEnginesRepresents a collection of view engines that are available to the application.
Public class ViewMasterPageRepresents the information that is needed to build a master view page.
Public class ViewMasterPageTModelRepresents the information that is required in order to build a strongly typed master view page.
Public class ViewPageRepresents the properties and methods that are needed to render a view as a Web Forms page.
Public class ViewPageTModelRepresents the information that is required in order to render a strongly typed view as a Web Forms page.
Public class ViewResultRepresents a class that is used to render a view by using an IView instance that is returned by an IViewEngine object.
Public class ViewResultBaseRepresents a base class that is used to provide the model to the view and then render the view to the response.
Public class ViewStartPageProvides an abstract class that can be used to implement a view start (master) page.
Public class ViewTemplateUserControlProvides a container for TemplateInfo objects.
Public class ViewTemplateUserControlTModelProvides a container for TemplateInfo objects.
Public class ViewTypeRepresents the type of a view.
Public class ViewUserControlRepresents the information that is needed to build a user control.
Public class ViewUserControlTModelRepresents the information that is required in order to build a strongly typed user control.
Public class VirtualPathProviderViewEngineRepresents an abstract base-class implementation of the IViewEngine interface.
Public class WebFormViewRepresents the information that is needed to build a Web Forms page in ASP.NET MVC.
Public class WebFormViewEngineRepresents a view engine that is used to render a Web Forms page to the response.
Public class WebViewPageRepresents the properties and methods that are needed in order to render a view that uses ASP.NET Razor syntax.
Public class WebViewPageTModelRepresents the properties and methods that are needed in order to render a view that uses ASP.NET Razor syntax.
Interfaces
  InterfaceDescription
Public interface IActionFilterDefines the methods that are used in an action filter.
Public interface IActionInvokerDefines the contract for an action invoker, which is used to invoke an action in response to an HTTP request.
Public interface IActionInvokerFactoryUsed to create an IActionInvoker instance for the current request.
Public interface IAuthorizationFilterDefines the methods that are required for an authorization filter.
Public interface IClientValidatableProvides a way for the ASP.NET MVC validation framework to discover at run time whether a validator has support for client validation.
Public interface IControllerDefines the methods that are required for a controller.
Public interface IControllerActivatorProvides fine-grained control over how controllers are instantiated using dependency injection.
Public interface IControllerFactoryDefines the methods that are required for a controller factory.
Public interface IDependencyResolverDefines the methods that simplify service location and dependency resolution.
Public interface IEnumerableValueProviderRepresents a special IValueProvider that has the ability to be enumerable.
Public interface IExceptionFilterDefines the methods that are required for an exception filter.
Public interface IFilterProviderProvides an interface for finding filters.
Public interface IMetadataAwareProvides an interface for exposing attributes to the AssociatedMetadataProvider class.
Public interface IMethodInfoActionDescriptorAn optional interface for ActionDescriptor types which provide a MethodInfo.
Public interface IModelBinderDefines the methods that are required for a model binder.
Public interface IModelBinderProviderDefines methods that enable dynamic implementations of model binding for classes that implement the IModelBinder interface.
Public interface IMvcFilterDefines members that specify the order of filters and whether multiple filters are allowed.
Public interface IResultFilterDefines the methods that are required for a result filter.
Public interface IRouteWithAreaAssociates a route with an area in an ASP.NET MVC application.
Public interface ITempDataProviderDefines the contract for temporary-data providers that store data that is viewed on the next request.
Public interface ITempDataProviderFactoryUsed to create an ITempDataProvider instance for the controller.
Public interface IUnvalidatedValueProviderRepresents an IValueProvider interface that can skip request validation.
Public interface IValueProviderDefines the methods that are required for a value provider in ASP.NET MVC.
Public interface IViewDefines the methods that are required for a view.
Public interface IViewDataContainerDefines the methods that are required for a view data dictionary.
Public interface IViewEngineDefines the methods that are required for a view engine.
Public interface IViewLocationCacheDefines the methods that are required in order to cache view locations in memory.
Public interface IViewPageActivatorProvides fine-grained control over how view pages are created using dependency injection.
Delegates
  DelegateDescription
Public delegate ActionSelectorRepresents a delegate that contains the logic for selecting an action method.
Public delegate DataAnnotationsModelValidationFactoryRepresents the method that creates a DataAnnotationsModelValidatorProvider instance.
Public delegate DataAnnotationsValidatableObjectAdapterFactoryProvides a factory for validators that are based on IValidatableObject.
Enumerations
  EnumerationDescription
Public enumeration AreaReferenceControls interpretation of a controller name when constructing a RemoteAttribute.
Public enumeration FilterScopeDefines values that specify the order in which ASP.NET MVC filters run within the same filter type and filter order.
Public enumeration FormMethodEnumerates the HTTP request types for a form.
Public enumeration Html5DateRenderingModeEnumerates the date rendering mode for HTML5.
Public enumeration HttpVerbsEnumerates the HTTP verbs.
Public enumeration InputTypeEnumerates the types of input controls.
Public enumeration JsonRequestBehaviorSpecifies whether HTTP GET requests from the client are allowed.