Krishan Dutt Sharma

Web Developer

My Blog


ASP.NET MVC stands for ASP.NET Model View Controller design pattern. MVC was first invented by Trygve Reenskaug and was named as “Thing Model View Editor” pattern originally. Slowly it became popular and renamed as “Model View Controller”. ASP.NET MVC was created by Scott Guthrie of Microsoft in 2007 based on the MVC framework implemented in different framework like Ruby on Rails, Spring etc. ASP.NET MVC (Model View Controller) is an architectural design pattern that separates an application into three main components

Read More

Create A New ASP.NET MVC Project In Visual Studio 2013

This Article is for Beginners, Who just Start with MVC and Visual Studio 2013. In this article, i am using Visual Studio 2013 Community Edition. Step-1 Open Visual Studio. You can open the Visual Studio in many ways which are I explain below: Click the Start button and type “v” in the “search” box. It will listed the programs (including Visual Studio) and select the Visual Studio.

Read More

ASP.NET MVC Application Folder Structure

In This Article we learn, How to Create a demo MVC Project using Visual Studio 2013 Community Edition. So, Friends lets Start with the creation of new Project. Create New Project in Visual Studio 2013 which we learn our previous article “Create A New ASP.NET MVC Project In Visual Studio 2013” ASP.NET MVC Folder Structure It is very important to Know about the folder Structure of MVC. It will help you to add files to an appropriate folder. Visual Studio creates the following folder structure of MVC application by default. App_Data: In MVC Folder Structure First Folder is App_Data which contains data files like LocalDB, .mdf Files, XML files and other data related files. IIS will never serve files from App_data Folder.

Read More

Routing In MVC 5

What is Routing : Routing is a mechanism to process the incoming URL that is more descriptive and gives desired response. In this case, URL is not mapped to specific files or folder as was the case of earlier days websites. There are two types of routing Convention based routing – to define this type of routing, we call MapRoute method and set its unique name, URL pattern and specify some default values. Attribute-based routing – to define this type of routing, we specify the Route attribute in the action method of the controller.

Read More

Asp.Net MVC Architecture MVC Architecture separates an application into three parts Model-View-Controller(MVC). MVC Architecture provides good “separation of concerns” in general “Loose coupling”. Following image shows how MVC architecture flow will beModel- The “M” in MVC : The model represents a set of classes that describe the business logic and data. it also defines business rules for how the data can be changed and manipulated. Models in MVC handles the data access Layer by using OTM tools like Entity Framework or NHibernate etc. ByDefaults, Models are stored in the Models Folder of the Project.

Read More

Razor View Engine in MVC.

Today, in this Article we learn about the Razor View Engine. Overview Razor Engine is an advance view engine that was introduced with MVC 3. This is not a new language but it is a new markup syntax. Ths namespace for razor engine is System.Web.Razor. The file extension used with Razor Engine is different from web form Engine. It has .cshtml or .vbhtml extension for View, Partial View, editor template and for layout pages. “Razor” was in development beginning in June 2010 and was released for Microsoft Visual Studio in January 2011.

Read More

Element in ASP.NET MVC View

It provides an easy way to Render HTML in our View. The following is the list of Html Helper controls. Html.Beginform Html.EndForm Html.Label Html.TextBox Html.TextArea Html.Password Html.DropDownList Html.CheckBox Html.RedioButton Html.ListBox Html.Hidden Below are Strongly Type Html Helper methods, this will allow us to check compile time errors. We get Model’s Property intelligence at Runtime. Html.LabelFor Html.TextBoxFor Html.TextAreaFor Html.DropDownListFor Html.CheckBoxFor Html.RadioButtonFor Html.ListBoxFor Html.HiddenFor Let’s dig intothe details, we have to design one registration form using above controls shown as per below screen. Here we have Label, Textbox, Password, Radio button, DropDown, and Checkbox. In ASP.NET Application we have Server Controls, so we just need to drag and drop from the Toolbox and design the page easily, but here in MVC Application, we don’t have Server Control so either we can use HTML or Html Helper Class Controls.

Read More

Subscribe to my weekly newsletter