Category Archives: MVC


In this post we will be setting up MongoDB in an MVC application. Before starting on it I expect that the audience has good knowledge of MongoDB.

MongoDb is a schema free, scalable, high performance document database. When we say schema less it blows mind of many SQL developers. Schema independent feature of MongoDB provides flexibility to the developer to develop the schema as they progress with the application.

Read the rest of this entry


Microsoft ASP.Net Web Application vs Website

A Web application is an application that can be hosted on a web server and can be accessed from any machine that lies in the intranet or internet which has the web browser to render and display the web pages in that application.

With the help of Visual studio 2012, the web application can be created by using two different templates provided. One is by using “New Website” template and another is by using “New Web Application” template. This document is basically to compare and contrast the features of using these templates.

How to Create a New Web Application Project:

  • In Visual Studio, Select new “project “option from file menu as shown below:

Read the rest of this entry

Dealing with Filters in MVC Framework 4.0

Introduction:- In software development field, we developers always try to use those things which makes our life easier. Frankly speaking we developers always try to write as less code as possible. And Microsoft understand it very well, so they developed Filters.

Ok, so question is how Filters will make our life easier?

Read the rest of this entry

Tuples (Magic In Views)

Many times we come across a situation in MVC when we require two different Models in a strongly typed View. This need usually arise when we have a requirement to use properties of two different models in a single view.

Problem : Can we really have two or more models in a strongly typed View???

  Read the rest of this entry

How to handle multiple submit buttons on a single form – MVC Razor

In MVC, there is no click event like(Button_Click) for buttons, action is used to handle the post action of the buttons.

(There are various ways for handling multiple submit buttons on the same form but the best two are below)

Method 1: Handle all Submit Buttons post in one Action:

Example: Suppose we have to perform some mathematical operation like (Add, Substract, Multiply, Divide) with 2 numeric values.

For this case, we will create a form and add 2 TextBoxes and 4 submit buttons for each opeartion (Add, Substract, Multiply and Divide).

Read the rest of this entry

%d bloggers like this: