MVC Articles

MVC tutorials list for step by step learning ASP.Net MVC fundamentals and practical implementation of MVC concepts using Visual Studio

Shared View in MVC

Any view that can be used by multiple controllers is known as shared view. It is placed in ‘Views\Shared’ folder. There can be more than one shared view in MVC application. For example , there are two controllers ‘Customer’ and ‘Agent’. We want to display same Contact view for both controllers. Action method Contact() will …

Shared View in MVC Read More »

Razor Advanced Syntax

In this article, I will explain advanced syntax in Razor. Please read my previous article Razor Syntax before reading this article, I have used project sample from article Razor Syntax . Conditions in Razor We can use ‘If else’ in Razor to display content based on some conditions. For example, if OrderAmount is greater than …

Razor Advanced Syntax Read More »

Razor Syntax

Whenever we create a View with .cshtml extension, then View is called as Razor View. In Razor View, we can use C# and html together. Now I will create a view and pass data dynamically to the view and use Razor syntax to display that data. I have created an action method CustomerDetails() in Home …

Razor Syntax Read More »

View Engine in MVC

MVC View can contain html and server side code such as C# and VB.Net. Browser can understand only html. Browser can not understand C# or VB.Net code. We can create a View in MVC based on View Engine and we have to write code in View as per selected View Engine. View Engine processes View …

View Engine in MVC Read More »