MVC data annotation for Model Validation

In this blog, we will see how data annotation work in MVC. We will also see how we can implement form validation using Data Annotation for Model. Data Annotation Form validation is always the primary task for a developer, either you can do this by using Client Side or Server Side. Data Annotation is doing … Read more

Error- This configuration section cannot be used at this path.This happens when the section is locked at a parent level.

Recently I installed Windows 10 and started developing application in MVC5. I hosted my application in IIS, but it was throwing below error while accessing URL. Error – This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault=”Deny”), or … Read more

Attribute Routing in ASP.NET MVC 5

As you know, Routing is the important building block in ASP.NET MVC application.Apart from convention-based routing, MVC 5 supports attribute routing.In this blog, we will see attribute routing in MVC 5. What is Routing? Routing is the way to map your action of a controller.  For more details view this blog MVC routing in details. … Read more

How to add constraints in MVC Route

In my earlier blogs, I wrote about Routing in MVC and ActionResult in MVC In this blog, I will write about – How to add constraints in MVC routing? For those who are new to MVC or MVC routing, please read my earlier blogs on MVC. What is Routing in MVC? Routing is the way … Read more

ActionResult in MVC

Controllers executes all incoming requests using Action method. An ActionMethod may return different type of result. In this blog, we will see about ActionResult of an ActionMethod in details. What is ActionResult? ActionResult is the base class for all action results in MVC. Whenever you create a controller class, a default action is created like … Read more

Differences between RenderBody and RenderSection in ASP.NET MVC

In my earlier blog, I wrote about _ViewStart.cshtml file and MVC Routing. In this blog, I will write about RenderBody vs RenderSection in MVC. @RenderBody() vs @RenderSection() RenderBody() – RenderBody() must be available in Layout view i.e. it is mandatory for Layout view RenderBody() does not take any parameter. A @RenderBody() in Layout page look like … Read more

What is ViewStart.cshtml in MVC?

Hi All, if you are new to MVC, read my earlier blogs on MVC. In my previous blog, I wrote about MVC routing. In this article, we will see the What is _ViewStart.cshtml file? What is ViewStart.cshtml file? _ViewStart.cshtml file is used to define the common layout page for all the views you add to your project. If you … Read more

RSS
YouTube
YouTube
Instagram