MVC: Razor Syntax

Please see my other MVC articles. Implementing logic into the Presentation layer. Perhaps one of the best features provided by MVC is the ability to implement logic into the UI to control output. To illustrate this feature, I’ll begin where my MVC: Action Methods using GET & POST article left off. As you can see,…

MVC: Links to Action Methods

Please see my other MVC articles. Using HTML links to execute controller action methods. It’s common to have a requirement that a controller’s action method be called from several different pages within a site. Also, this knowledge usually won’t be entirely flushed out at the beginning of project development. To compensate for this need, MVC…

MVC: Grid

Please see my other MVC articles. Leveraging the MVC Grid to quickly display sortable, paging data. MVC provides robust data controls for displaying data sets. These grids come with many customizable features and require very little coding. To illustrate this feature, I’ll begin a Model for Sales Associates. Next, I’ll create a Controller which seeds…

MVC: Entity Framework

Please see my other MVC articles. Using Microsoft’s powerful ORM tool to perform data-layer operations. Most tasks performed in today’s data-driven websites revolved around one or more of the Create-Retrieve-Update-Delete (C.R.U.D.) operations. Microsoft has provided a very elegant, easy-to-use, yet powerful tool that abstracts a lot of the complexity necessary for most CRUD operations while…

MVC: Custom Model

Please see my other MVC articles. Developing a custom model to encapsulate a unique domain. The Model serves as the heart of the MVC application, containing a domain’s business logic. In this example, I will illustrate how to create a custom Model representing a typical sales associate within any company. Also, I will build a Create View…

MVC: ContentResult

Please see my other MVC articles. Returning different types of content. MVC provide flexibility when answering requests for resources by supporting different types of content. In this article, I will illustrate the use of the ContentType to return plain text and XML. Here I have a simple example of how a Controller may return plain…

MVC: C.R.U.D. Operations

Please see my other MVC articles. Using Entity Framework to leverage CRUD operations within a website. Most tasks performed in today’s data-driven websites revolved around one or more of the Create-Retrieve-Update-Delete (C.R.U.D.) operations. Microsoft has provided a very elegant, easy-to-use, yet powerful tool that abstracts a lot of the complexity necessary for most CRUD operations…

MVC: Action Methods with Parameters

Please see my other MVC articles. Passing arguments to action methods. It’s often necessary when calling an action method to pass to it variables necessary for business logic. In this article, I will illustrate one method that is similar to the Web Forms programming model of using the question mark + equals sign convention (?VariableName=Value).…

MVC: Action Methods using GET & POST

Please see my other MVC articles. Enabling specific actions for GET and POST calls. MVC provided an elegant method to specify actions based on the type of call used by the webpage – GET (default) Http verb or POST Http verb. To illustrate this ability, I’ll begin where my Form Validation article left off with…

Knockout: Updating the ViewModel

Please see my other JavaScript articles. Using Knockout.js to dynamically bind events to fields. In most web applications, the user drives the business process being invoked. Therefore, it’s necessary to allow them to “fire” events in order to provide the desired functionality. To illustrate how to integrate an event, I will begin where my last…