ASP.

NET MVC - Internet Application
Creating the Web Application
If you have Visual Web Developer installed, start Visual Web Developer and select New Project. Otherwise just read and learn.

In the New Project dialog box:
• • • • •

Open the Visual C# templates Select the template ASP.NET MVC 3 Web Application Set the project name to MvcDemo Set the disk location to something like c:\w3schools_demo Click OK

When the New Project Dialog Box opens:
• • • •

Select the Internet Application template Select the Razor Engine Select HTML5 Markup Click OK

Visual Studio Express will create a project like this:

In the picture above, in the Solution Explorer, you can see that a folder structure has been created for the application:
1. 2. 3. 4. 5. 6. An App_Data folder for data content A Content folder for static content A Controllers folder for controller classes A Models folder for the model classes A Scripts folder for JavaScript files A Views folder for views

In addition to the folders, some other files like (Global.asax and Web.config) have been created.

MVC Folders
A typical ASP.NET MVC web application has the following folder content:

Application information Properties References Application folders
App_Data Folder Content Folder Controllers Folder Models Folder Scripts Folder Views Folder

Configuaration files Global.asax packages.config Web.config The folder names above is equal in all MVC applications. The MVC framework is based on default naming. Controllers are in the Controllers folder, Views are in the Views folder, and Models are in the Models folder. You don't have to folder names in your application code. Standard naming reduces the amount of code, and makes it easier for developers to understand MVC projects. Below is a brief summary of the content of each folder:

The App_Data Folder
The App_Data folder is for storing application data. We will add a database to the App_Data folder, later in this tutorial.

The Content Folder
The Content folder is used for static files like style sheets (css files), icons and images. Visual Web Developer automatically adds a themes folder to the Content folder. The themes folder is filled with jQuery styles and pictures. In this project you can delete the themes folder. Visual Web Developer also adds a standard style sheet file to the project. The file Site.css in the content folder, is the file to edit to change the style of the application.

Visual Web Developer has created a Home controller (for Home and About pages) and an Account controller (for Login pages): We will create more controller files later in this tutorial. to end with "Controller". MVC requires the name of all controller files in this folder.We will edit the Stylesheet file (Site. .css) file in the next chapter. The Controllers Folder The Controllers folder contains the controller classes responsible for handling user input and responses.

The Views folder contains one folder for each controller. We will create our models (classes) in a later chapter of this tutorial. The Home folder is used for storing application pages like home pages and about pages. a Home folder. The Account folder is used for storing register and login pages. and a Shared folder (inside the Views folder). The Shared folder is used to store views shared between controllers (master pages and layout pages). The Views Folder The Views folder stores the HTML files related to the display of the application (the user interfaces). . We will edit the layout files in the next chapter.The Models Folder The Models folder contains the classes that represent the application models. Visual Web Developer has created an Account folder. Models hold and manipulate application data.

Open the file and swap the content with this: . Ajax. and jQuery files: Note: The files named "modernizr" are JavaScript files used for supporting HTML5 and CSS3 features in the application. It is located in the Shared folder inside the Views folder.cshtml represent the layout of each page in the application.The Scripts Folder The Scripts folder stores the JavaScript files of the application. Adding a Layout The file _Layout. By default Visual Web Developer fills this folder with standard MVC.

5. the code marked red are C# using Razor markup.Content("~/Content/Site.css. It is located in the Content folder.Content() . "Index".ActionLink("Home". All Rights Reserved.1. You will learn more about HTML helpers in a later chapter of this tutorial.min.The page content will be rendered here. "Home")</li> <li>@Html. "Home")</li> </ul> <section id="main"> @RenderBody() <p>Copyright W3schools 2012. Adding Styles The style sheet for the application is called Site.js")" type="text/javascript"></script> </head> <body> <ul id="menu"> <li>@Html. @ViewBag.HTML link will be inserted here. HTML helpers are used to modify HTML output: @Url.Content("~/Scripts/jquery-1. "About". .ActionLink("About". "Index".css")" rel="stylesheet" type="text/css" /> <script src="@Url.URL content will be inserted here.</p> </section> </body> </html> HTML Helpers In the code above.7.ActionLink() .ActionLink("Movies".Title</title> <link href="@Url.js")" type="text/javascript"></script> <script src="@Url.min.The page title will be inserted here. Razor Syntax In the code above. "Movies")</li> <li>@Html. @RenderBody() . @Html.<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>@ViewBag. You can learn about Razor markup for both C# and VB (Visual Basic) in our Razor tutorial.Content("~/Scripts/modernizr-1.Title .

/*CSS3 properties*/ border-radius: 4px 4px 0 0. } h1 { border-bottom: 3px solid #cc9900. serif.8em. text-decoration: none.Open the file Site. background-color: #5c87b2. } ul#menu li a { background-color: #e8eef4. background-color: #ffffff. } a { color: #034af3. margin: 0. line-height: 2. sans-serif. } #main { padding: 20px. color: #696969. font: Georgia. } ul#menu li a:hover { background-color: #ffffff. } /* Forms Styles ------------------------------*/ fieldset . border-radius: 0 4px 4px 4px. position: relative.css and swap the content with this: body { font: "Trebuchet MS". color: #996600. } /* Menu Styles ------------------------------*/ ul#menu { padding: 0px. Verdana. padding: 10px 20px. } ul#menu li { display: inline.

data { background-color:#ffffff. padding:3px. } table. padding:3px. border:1px solid #c3c3c3.data th { background-color:#e8eef4. .{ padding-left: 12px. } fieldset label { display: block. If you remove this file. } table.data td { border:1px solid #c3c3c3. border-collapse:collapse. } input[type="text"]. } The _View_Start File The _View_Start file in the Shared folder (inside the Views folder) contains the following content: @{Layout = "~/Views/Shared/_Layout. input[type="password"] { width: 300px.} This code is automatically added to all views displayed by the application. border:1px solid #c3c3c3. width:100%. you must add this line to all views. padding: 4px. } input[type="submit"] { padding: 4px.cshtml". } /* Data Styles ------------------------------*/ table.

you have not installed SQL Server Compact on your computer. Title is a 100 character text column to store the name of the movie.sdf file in the App_Data folder will open a Database Explorer window. Create the following columns: Column ID Title Director Date Type int (primary key) nvarchar(100) nvarchar(100) datetime No No No No Allow Nulls Columns explained: ID is an integer (whole number) used to identify each record in the table. Date is a datetime column to store the release date of the movie. The database needed for this tutorial can be created with these simple steps: • • • • • Right-click the App_Data folder in the Solution Explorer window Select Add. To create a new table in the database. New Item Select SQL Server Compact Local Database * Name the database Movies. If you want to study this topic first. . Adding a Database Table Double-clicking the Movies. and select Create Table.Creating the Database Visual Web Developer comes with a free SQL database called SQL Server Compact. right-click the Tables folder. Director is a 100 character text column to store the director's name. please visit our SQL Tutorial. Click the Add button * If SQL Server Compact Local Database is not an option. Note: In this tutorial it is expected that you have some knowledge about SQL databases. Install it from this link: SQL Server Compact Visual Web Developer automatically creates the database in the App_Data folder.sdf.

Double-click the Movies.After creating the columns described above. Adding Database Records You can use Visual Web Developer to add some test records to the movie database. To do this. you must make the ID column the table's primary key (record identifier). but this is the naming convention you have to use to make the controller connect to the database table. It looks strange. save the table and name it MovieDBs. Right-click the MovieDBs table in the Database Explorer window and select Show Table Data. you will see the name "MovieDB" used for the data model. In the next chapter. set the Identity property to True: When you have finished creating the table columns. click on the column name (ID) and select Primary Key. . in the Column Properties window.sdf file in the App_Data folder. Also. Note: We have deliberately named the table "MovieDBs" (ending with s).

01.Add some records: ID 1 2 Psycho La Dolce Vita Title Director Alfred Hitchcock Federico Fellini Date 01. except pure view and controller logic. a ChangePasswordModel. and a RegisterModel: . The Models Folder The Models Folder contains the classes that represent the application model. You should not edit it. With MVC.sdf" providerName="System. and data access logic).cs file that contains the models for application authentication. Visual Web Developer automatically creates an AccountModels.1960 01. AccountModels contains a LogOnModel. Adding a Connection String Add the following element to the <connectionStrings> element in your Web.Data.1960 Note: The ID column is updated automatically. validation logic. models both hold and manipulate application data.01.SqlServerCe.0"/> MVC Models The MVC Model contains all application logic (business logic.config file: <add name="MovieDBContext" connectionString="Data Source=|DataDirectory|Movies.4.

using System. } public string Director { get. using System. set.Linq. set.Adding a Database Model The database model needed for this tutorial can be created with these simple steps: • • • In the Solution Explorer.Web. set. right-click the Models folder. } public string Title { get.Models { public class MovieDB { public int ID { get. Edit the class: using System. Name the class MovieDB.Entity. namespace MvcDemo.Collections. using System.Generic. } } } . using System. set.cs. } } public class MovieDBContext : DbContext { public DbSet<MovieDB> Movies { get. and select Add and Class. and click Add. set.Data. } public DateTime Date { get.

cs (for the Home and About pages) and AccountController. you saw the name "MovieDBs" (endig with s) used for the database table.cs (For the Log On pages): Web servers will normally map incoming URL requests directly to disk files on the server. Controllers are responsible for processing incoming requests. The MVC framework maps differently. These methods are in classes called "Controllers".Note: We have deliberately named the model class "MovieDB". handling input. It looks strange. saving data. Swap the content of the HomeController. In our example.cs file with this: . Visual Web Developer has created the following files: HomeController. defines the two controls Index and About. For example: an URL request like "http://www.asp" at the root directory of the server.com/default. but this is the naming convention you have to use to make the model connect to the database table. In the previous chapter. MVC maps URLs to methods.w3schools.asp" will map directly to the file "default.cs. MVC requires the name of all controllers to end with "Controller". The Home controller The controller file in our application HomeController. The Controllers Folder The Controllers Folder contains the controller classes responsible for handling user input and responses. and sending a response to send back to the client.

namespace MvcDemo. using System.cs file in the Controllers folder A Movies folder in the Views folder The following files are created in the Movies folder: • • • Create. You will edit the views in the next chapter.cshtml Delete.cshtml .} public ActionResult About() {return View(). using System.Mvc.Linq.Models) Select data context class: MovieDBContext (McvDemo. Adding a Database Controller The database controller needed for this tutorial can be created with these simple steps: • • • • • • • In the Solution Explorer.using System.Generic.Models) Select views Razor (CSHTML) Click Add Visual Web Developer will create the following files: • • A MoviesController. using System.Collections.Web. using Entity Framework Select model class: MovieDB (McvDemo. right-click the Controllers folder.cshtml in the Views folder defines the view of the controller. and select Add and Controller Set controller name to MoviesController Select template: Controller with read/write actions and views.cshtml Details.Web.cshtml and About.} } } The Controller Views The files Index. using System.Controllers { public class HomeController : Controller { public ActionResult Index() {return View().

and a Shared folder (inside the Views folder). The Home folder is used for storing application pages like home pages and about pages.cshtml Index. depending on the language content.• • Edit. ASP. These files may have the extensions html. a Home folder.NET File Types The following HTML file types can be found in the Views Folder: File Type Extention . aspx. and vbhtml. The Account folder is used for storing register and login pages. The Views folder contains one folder for each controller. Visual Web Developer has created an Account folder.cshtml The Views Folder The Views folder stores the files (HTML files) related to the display of the application (the user interfaces). The Shared folder is used to store views shared between controllers (master pages and layout pages). cshtml. asp.

cshtml represent the About page of the application.Title = "About Us". . It is the application's default file (index file). Start Debugging (or F5) from the Visual Web Developer menu.cshtml C# ASP.htm or .html . Put the following content in the file: @{ViewBag.asp .NET .NET Razor .cshtml represent the Home page of the application.} <h1>About Us</h1> <p>Put About Us content here</p> Run the Application Select Debug.vbhtml VB The Index File The file Index.} <h1>Welcome to W3Schools</h1> <p>Put Home Page content here</p> The About File The file About.Title = "Home Page". Put the following content in the file: @{ViewBag.NET Razor .aspx ASP.Plain HTML Classic ASP Classic ASP.

ActionLink() does not link to a view. With MVC. But HTML helpers are more lightweight. Razor Syntax: @Html. the Html. or use the built in HTML helpers. It creates a link to a controller action. HTML helpers are much like traditional ASP.ActionLink("About this Website". Just like web form controls in ASP. Standard HTML Helpers MVC includes standard helpers for the most common types of HTML elements. like HTML links and HTML form elements. HTML helpers are used to modify HTML. you can create your own helpers. In most cases.Your application will look like this: HTML Helpers With MVC. HTML Links The easiest way to render an HTML link in is to use the HTML. an HTML helper does not have an event model and a view state. an HTML helper is just a method that returns a string. With MVC. Unlike Web Form controls.ActionLink() helper.NET Web Form controls. "About") ASP Syntax: .NET.

you can pass the id of a database record to a database edit action: Razor Syntax C#: @Html. "Edit". outputs the following HTML: <a href="/Home/Edit/3">Edit Record</a> HTML Form Elements There following HTML helpers can be used to render (modify and output) HTML form elements: . outputs the following HTML: <a href="/Home/About">About this Website</a> The Html. The set of attributes to htmlAttribute the link s . For example.routeValues The values passed to the action . and the second parameter is the name of the controller action. New With{.ActionLink("About this Website".protocol .ActionLink("Edit Record".ActionLink() helper as several properties: Property .linkText Description The link text (label) . controllerNa The target controller me .ActionLink() helper above.<%=Html.fragment The link protocol The host name for the link The anchor target for the link Note: You can pass values to a controller action. The Html.Id=3}) The Html.ActionLink() helper above.ActionLink("Edit Record". "About")%> The first parameter is the link text. "Edit".hostname . new {Id=3}) Razor Syntax VB: @Html.actionName The target action .

NET Syntax C#: <%= Html.• • • • • • • • • • BeginForm() EndForm() TextArea() TextBox() CheckBox() RadioButton() ListBox() DropDownList() Hidden() Password() ASP.TextArea("Profile".Password("ConfirmPassword") %> <%= Html.ValidationMessage("Password". Please correct the errors and try again.TextBox("LastName") %> <%= Html. "*") %> </p> <p> <label for="LastName">Last Name:</label> <%= Html. "*") %> </p> <p> <label for="Profile">Profile:</label> <%= Html.TextBox("FirstName") %> <%= Html.ValidationMessage("ConfirmPassword". new {cols=60.ValidationMessage("LastName".BeginForm()){%> <p> <label for="FirstName">First Name:</label> <%= Html.CheckBox("ReceiveNewsletter") %> <label for="ReceiveNewsletter" style="display:inline">Receive Newsletter?</label> </p> <p> <input type="submit" value="Register" /> </p> <%}%> .ValidationMessage("FirstName". "*") %> </p> <p> <label for="Password">Password:</label> <%= Html.ValidationSummary("Create was unsuccessful. rows=10})%> </p> <p> <%= Html. "*") %> </p> <p> <label for="Password">Confirm Password:</label> <%= Html.") %> <% using (Html.Password("Password") %> <%= Html.

such as its name. attributes. parameters. (It is strongly recommended that your application explicitly check all models where you disable request validation in order to prevent script exploits.Classes Class AcceptVerbsAttribute Description Represents an attribute that specifies which HTTP verbs an action method will respond to. Represents an attribute that is used to influence the selection of an action method. Provides information about an action method. Represents support for rendering HTML in AJAX scenarios within a view. Represents support for rendering HTML in AJAX scenarios within a strongly typed view. Represents an attribute that is used for the name of an action. Allows a request to include HTML markup during model binding by skipping request validation for the property. Encapsulates the result of an action method and is used to perform a framework-level operation on behalf of the action method. Represents a class that extends the HttpRequestBase class by adding the ability to determine whether an HTTP request is an AJAX request. and filters. Represents an attribute that affects the selection of an action method. Provides the context for the ActionExecuted method of the ActionFilterAttribute class. Provides a class that implements the IMetadataAware interface in order to support additional metadata.) Provides a way to register one or more areas in an ActionDescriptor ActionExecutedContext ActionExecutingContext ActionFilterAttribute ActionMethodSelectorAttribute ActionNameAttribute ActionNameSelectorAttribute ActionResult AdditionalMetadataAttribute AjaxHelper AjaxHelper(Of TModel) AjaxRequestExtensions AllowHtmlAttribute AreaRegistration . controller. Represents the base class for filter attributes. Provides the context for the ActionExecuting method of the ActionFilterAttribute class.

ider CompareAttribute ContentResult Provides an attribute that compares two properties of a model. in milliseconds. Encapsulates the information that is required for using an AuthorizeAttribute attribute. Represents the base class for views that are compiled by the BuildManager class before being rendered by a view engine.ASP.NET MVC application. Represents a factory for creating value provider objects for child actions. Represents an attribute that is used to set the timeout value. AreaRegistrationContext Encapsulates the information that is required in order to register an area within an ASP. Provides a base class for view engines. Represents a user-defined content type that is the result of an action method. Maps a browser request to a byte array. Represents an attribute that is used to indicate that an action method should be called only as a child action.NET MVC application. Provides the base class for asynchronous controllers. AssociatedMetadataProvider AssociatedValidatorProvider AsyncController AsyncTimeoutAttribute AuthorizationContext AuthorizeAttribute BindAttribute BuildManagerCompiledView BuildManagerViewEngine ByteArrayModelBinder ChildActionOnlyAttribute ChildActionValueProvider ChildActionValueProviderFactory ClientDataTypeModelValidatorProv Returns the client data-type model validators. for an asynchronous method. Provides an abstract class to implement a metadata provider. Provides an abstract class for classes that implement a validation provider. Represents an attribute that is used to provide details about how model binding to a parameter should occur. . Represents a value provider for values from child actions. Represents an attribute that is used to restrict access by callers to an action method.

Represents a class that is responsible for invoking the action methods of a controller. Represents a memory cache for view locations. Adds the controller to the FilterProviderCollection instance. for the DataAnnotationsModelMetadataProvider class. Represents a class that is responsible for dynamically building a controller.Controller ControllerActionInvoker ControllerBase ControllerBuilder Provides methods that respond to HTTP requests that are made to an ASP. Encapsulates information that describes a controller. and for the DataAnnotationsModelValidator class for a data model. Represents the base class for all MVC controllers. DataAnnotationsModelValidator(Of Provides a model validator for a specified TAttribute) validation type. DataAnnotationsModelValidator Provides a model validator. type.NET MVC. ControllerContext ControllerDescriptor ControllerInstanceFilterProvider CustomModelBinderAttribute DataAnnotationsModelMetadata DataAnnotationsModelMetadataPr Implements the default model metadata provider ovider for ASP. such as its name. Represents an attribute that invokes a custom model binder. Maps a browser request to a data object. DataErrorInfoModelValidatorProvid Provides a container for the error-information er model validator.NET MVC Web site. and actions. DataAnnotationsModelValidatorPro Implements the default validation provider for vider ASP.NET MVC. Provides a registration point for dependency resolvers that implement IDependencyResolver or the Common Service Locator IServiceLocator DefaultModelBinder DefaultViewLocationCache DependencyResolver . Provides a container for common metadata. This class provides a concrete implementation of a model binder. Encapsulates information about an HTTP request that matches specified RouteBase and ControllerBase instances. DefaultControllerFactory Represents the controller factory that is registered by default.

Sends binary content to the response by using a Stream instance. DictionaryValueProvider(Of TValue) EmptyModelMetadataProvider EmptyModelValidatorProvider EmptyResult ExceptionContext ExpressionHelper FieldValidationMetadata FileContentResult FilePathResult FileResult FileStreamResult Filter FilterAttribute FilterAttributeFilterProvider FilterInfo FilterProviderCollection FilterProviders . Provides a container for client-side field validation metadata. Sends the contents of a file to the response.interface. DependencyResolverExtensions Provides a type-safe implementation of GetService and GetServices. TValue) interface. Represents a metadata class that contains a reference to the implementation of one or more of the filter interfaces. Provides an empty validation provider for models that do not require a validator. Provides the context for using the HandleErrorAttribute class. Provides an empty metadata provider for data models that do not require metadata. Defines a filter provider for filter attributes. Represents the base class for value providers whose values come from a collection that implements the IDictionary(Of TKey. Represents a base class that is used to send binary file content to the response. the filter's order. Represents a result that does nothing. Provides a helper class to get the model name from an expression. Provides a registration point for filters. and the filter's scope. Represents the collection of filter providers for the application. such as a controller action method that returns nothing. Sends the contents of a binary file to the response. Encapsulates information about the available action filters. Represents the base class for action and result filter attributes.

FormCollection Contains the form value providers for the application. Represents an attribute that is used to restrict an action method so that the method handles only HTTP DELETE requests. Represents an attribute that is used to handle an exception that is thrown by an action method. FormContext FormValueProvider FormValueProviderFactory GlobalFilterCollection GlobalFilters HandleErrorAttribute HandleErrorInfo HiddenInputAttribute HtmlHelper HtmlHelper(Of TModel) HttpDeleteAttribute HttpFileCollectionValueProvider Represents a class that is responsible for creating HttpFileCollectionValueProviderFac a new instance of an HTTP file collection value tory provider object. Encapsulates information that is required in order to validate and process the input data from an HTML form. Encapsulates information for handling an error that was thrown by an action method. Represents a value provider to use with values that come from a collection of HTTP files. Represents a class that contains all the global filters. Represents support for rendering HTML controls in a view. Represents a class that is responsible for creating a new instance of a form-value provider object. Defines an object that is used to indicate that the requested resource was not found. HttpGetAttribute Represents an attribute that is used to restrict an action method so that the method handles only HTTP GET requests. Represents a value provider for form values that are contained in a NameValueCollection object. Represents an attribute that is used to restrict an action method so that the method handles only HttpNotFoundResult HttpPostAttribute . Represents the global filter collection. Represents an attribute that is used to indicate whether a property or field value should be rendered as a hidden input element. Represents support for rendering HTML controls in a strongly typed view.

Provides a container for a regular-expression client validation rule that is sent to the browser. listed by binder type. Represents a class that is used to send JSONformatted content to the response. Provides a way to return an action result with a specific HTTP response status code and description. Represents the result of an unauthorized HTTP request. HttpPostedFileBaseModelBinder HttpPutAttribute Binds a model to a posted file. Sends JavaScript content to the response. Represents an attribute that is used to restrict an action method so that the method handles only HTTP PUT requests. Extends the HttpRequestBase class that contains the HTTP values that were sent by a client during a Web request. Provides a container for an equality validation rule that is sent to the browser. Provides global access to the model binders for the application. HttpRequestExtensions HttpStatusCodeResult HttpUnauthorizedResult JavaScriptResult JsonResult JsonValueProviderFactory LinqBinaryModelBinder ModelBinderAttribute ModelBinderDictionary ModelBinderProviderCollection ModelBinderProviders ModelBinders ModelBindingContext ModelClientValidationEqualToRule ModelClientValidationRangeRule ModelClientValidationRegexRule ModelClientValidationRemoteRule Provides a container for a remote validation rule .HTTP POST requests. Represents a class that contains all model binders for the application. Represents an attribute that is used to associate a model type to a model-builder type. Provides a container for a range-validation rule that is sent to the browser. Provides the context in which a model binder functions. Enables action methods to send and receive JSONformatted text and to model-bind the JSON text to parameters of action methods. Maps a browser request to a LINQ Binary object. Provides a container for model binder providers. Provides a container for model binder providers.

or to the argument itself. Provides a container for a list of validation providers. Provides an abstract base class for a custom metadata provider. ModelError ModelErrorCollection ModelMetadata Represents an error that occurs during model binding. Encapsulates the state of model binding to a property of an action-method argument. Provides a base class container for a client validation rule that is sent to the browser. provides a metadata class that contains a reference to the implementation of one or more of the filter interfaces. and for the ModelValidator class for a data model. When implemented in a derived class. Represents a list of items that users can select more than one item from. Provides a base class for implementing validation logic. Provides a list of validators for a model. for the ModelMetadataProvider class. Provides a container for common metadata. and the filter's scope. Represents the state of an attempt to bind a posted form to an action method. ModelClientValidationStringLength Provides a container for a string-length validation Rule rule that is sent to the browser. which includes validation information. A collection of ModelError instances. Selects the controller that will handle an HTTP ModelMetadataProvider ModelMetadataProviders ModelState ModelStateDictionary ModelValidationResult ModelValidator ModelValidatorProvider ModelValidatorProviderCollection ModelValidatorProviders MultiSelectList MvcFilter MvcHandler . Provides a container for a validation result. Provides a container for the current validation provider. the filter's order. Provides a container for the current ModelMetadataProvider instance. ModelClientValidationRequiredRule ModelClientValidationRule Provides a container for client validation for required field.that is sent to the browser.

Contains information that describes a parameter. Provides a registration point for ASP. Extends a NameValueCollection object so that the collection can be copied to a specified dictionary. Creates instances of MvcWebPageRazorHost files.NET Razor syntax. Creates an object that implements the IHttpHandler interface and passes the request context to it. MvcHtmlString MvcHttpHandler MvcRouteHandler MvcWebRazorHostFactory NameValueCollectionExtensions Represents an HTML-encoded string that should not be encoded again. Represents a base class that is used to send a partial view to the response. QueryStringValueProviderFactory RangeAttributeAdapter RazorView RazorViewEngine . Encapsulates information for binding actionmethod parameters to a data model.request. Provides an adapter for the RangeAttribute attribute. Represents an attribute that is used to indicate that a controller method is not an action method. Verifies and processes an HTTP request. Represents a class that is responsible for creating a new instance of a query-string value-provider object. Represents an attribute that is used to mark an action method whose output will be cached. Represents the base class for value providers NameValueCollectionValueProvider whose values come from a NameValueCollection object. NoAsyncTimeoutAttribute NonActionAttribute OutputCacheAttribute ParameterBindingInfo ParameterDescriptor PartialViewResult PreApplicationStartCode QueryStringValueProvider Provides a convenience wrapper for the AsyncTimeoutAttribute attribute.NET Razor pre-application start code. Represents a value provider for query strings that are contained in a NameValueCollection object. Represents a view engine that is used to render a Web page that uses the ASP. Represents the class used to create views that have Razor syntax.

Contains information that describes a reflected action-method parameter. Represents a factory for creating route-data value provider objects. RemoteAttribute RequiredAttributeAdapter RequireHttpsAttribute ResultExecutedContext ResultExecutingContext RouteCollectionExtensions RouteDataValueProvider Provides an attribute that uses the jQuery validation plug-in remote validator. RegularExpressionAttributeAdapte Provides an adapter for the r RegularExpressionAttribute attribute. Represents a value provider for route data that is contained in an object that implements the IDictionary(Of TKey. Extends a RouteCollection object for MVC routing. Provides session-state data to the current TempDataDictionary object. Provides an adapter for the RequiredAttributeAttribute attribute. Provides the context for the OnResultExecuted method of the ActionFilterAttribute class. Represents a result that performs a redirection by using the specified route values dictionary. Provides an adapter for the StringLengthAttribute attribute. Represents the selected item in an instance of the SelectList class. Contains information that describes a reflected controller.RedirectResult RedirectToRouteResult ReflectedActionDescriptor ReflectedControllerDescriptor ReflectedParameterDescriptor Controls the processing of application actions by redirecting to a specified URI. Contains information that describes a reflected action method. Provides the context for the OnResultExecuting method of the ActionFilterAttribute class. Represents a set of data that persists only from RouteDataValueProviderFactory SelectList SelectListItem SessionStateAttribute SessionStateTempDataProvider StringLengthAttributeAdapter TempDataDictionary . Specifies the session state of the controller. TValue) interface. Represents a list that lets users select one item. Represents an attribute that forces an unsecured HTTP request to be re-sent over HTTPS.

Represents an attribute that is used to mark action methods whose input must be validated. Represents the collection of value-provider objects for the application. Represents the result of binding a value (such as from a form post or query string) to an actionmethod argument property. Represents an attribute that is used to prevent forgery of a request. Represents a factory for creating value-provider objects. Represents a collection of view engines that are ValueProviderResult ViewContext ViewDataDictionary ViewDataDictionary(Of TModel) ViewDataInfo ViewEngineCollection . Represents an optional parameter that is used by the MvcHandler class during routing. Represents the collection of value-provider factories for the application.NET MVC within an application. or to the argument itself. Provides an object adapter that can be validated. TemplateInfo UrlHelper UrlParameter ValidatableObjectAdapter ValidateAntiForgeryTokenAttribute ValidateInputAttribute ValueProviderCollection ValueProviderDictionary ValueProviderFactories ValueProviderFactory ValueProviderFactoryCollection Encapsulates information about the current template context. Represents a container that is used to pass data between a controller and a view.one request to the next. Encapsulates information about the current template content that is used to develop templates and about HTML helpers that interact with templates. Contains methods to build URLs for ASP. Obsolete. Represents a container that is used to pass strongly typed data between a controller and a view. Encapsulates information that is related to rendering a view. Represents a container for value-provider factory objects. Represents a dictionary of value providers for the application.

Represents the information that is needed to build a user control. Represents the information that is needed to build a Web Forms page in ASP. Represents the information that is required in order to build a strongly typed user control.NET MVC. Represents the information that is needed to build a master view page. Represents the information that is required in order to render a strongly typed view as a Web Forms page. Represents the properties and methods that are needed in order to render a view that uses ViewPage(Of TModel) ViewResult ViewResultBase ViewStartPage ViewTemplateUserControl ViewTemplateUserControl(Of TModel) ViewType ViewUserControl ViewUserControl(Of TModel) VirtualPathProviderViewEngine WebFormView WebFormViewEngine WebViewPage . Represents a class that is used to render a view by using an IView instance that is returned by an IViewEngine object. Provides a container for TemplateInfo objects. Provides an abstract class that can be used to implement a view start (master) page.available to the application. Represents the properties and methods that are needed to render a view as a Web Forms page. Provides a container for TemplateInfo objects. Represents the information that is required in order to build a strongly typed master view page. Represents the type of a view. ViewEngineResult ViewEngines ViewMasterPage ViewMasterPage(Of TModel) ViewPage Represents the result of locating a view engine. Represents a collection of view engines that are available to the application. Represents an abstract base-class implementation of the IViewEngine interface. Represents a base class that is used to provide the model to the view and then render the view to the response. Represents a view engine that is used to render a Web Forms page to the response.

Defines the methods that are required for a controller factory. Defines the methods that are required for an exception filter.NET MVC application. Defines the methods that are required for a model binder. Provides an interface for finding filters.NET Razor syntax. Defines the contract for an action invoker. Provides a way for the ASP.ASP. Defines the methods that are required for a result filter. Associates a route with an area in an ASP. Provides fine-grained control over how controllers are instantiated using dependency injection. IMvcFilter IResultFilter IRouteWithArea ITempDataProvider Defines members that specify the order of filters and whether multiple filters are allowed. IClientValidatable IController IControllerActivator IControllerFactory IDependencyResolver IExceptionFilter IFilterProvider IMetadataAware IModelBinder Defines methods that enable dynamic implementations of IModelBinderProvider model binding for classes that implement the IModelBinder interface. Defines the methods that are required for a controller. Defines the contract for temporary-data providers that store . Defines the methods that simplify service location and dependency resolution. Provides an interface for exposing attributes to the AssociatedMetadataProvider class. which is used to invoke an action in response to an HTTP request. Interfaces Interface IActionFilter IActionInvoker IAuthorizationFilter Description Defines the methods that are used in an action filter.NET MVC validation framework to discover at run time whether a validator has support for client validation. WebViewPage(Of TModel) Represents the properties and methods that are needed in order to render a view that uses ASP. Defines the methods that are required for an authorization filter.NET Razor syntax.

IUnvalidatedValueProv Represents an IValueProvider interface that can skip request ider validation. Defines the methods that are required for a view data dictionary.NET MVC. Defines the methods that are required for a view. Defines the methods that are required in order to cache view locations in memory. IValueProvider IView IViewDataContainer IViewEngine IViewLocationCache IViewPageActivator Defines the methods that are required for a value provider in ASP. Defines the methods that are required for a view engine.data that is viewed on the next request. Provides fine-grained control .

Sign up to vote on this title
UsefulNot useful