Pass DataTable from Controller to View in ASP.Net MVC

In this article, you are going to learn how to pass a DataTable from a controller to a razor view in ASP.NET MVC. The table passed will be displayed on the view page. Pass DataTable from Controller to View To get started, let’s create a database table like the following: CREATE TABLE [dbo].[Novel]( [NovelID] [int]... » read more

Create Cascading Dropdown List in ASP.NET MVC

In this example, you will learn how to create a Cascading Dropdown list in ASP.NET MVC. What is cascading dropdown list? Collection of dropdown list controls dependent on each other while each and every control depends on the parent control or the previous control. Each element in the dropdown list is controlled by the parent... » read more

Create a Logoff/Logout Action in ASP.NET MVC

In some web environments, closing the web browser will not abandon the current user session. It’s important to create an appropriate logout/logoff action for your application for better security and privacy, especially for users that use in computers and devices. Below is the “Action” method that can be used inside your controller to kill the logged in... » read more

How Controllers Handle Requests in ASP.NET Core MVC?

ASP.NET Core MVC provides you with a unified web programming model through which you can create web APIs and web UI. The MVC pattern is called the design pattern. It is essentially separate from any other particular framework or language. It is a way of approaching designing a program that you can apply with any... » read more

Creating Repository pattern in ASP.net MVC

In this article, I will help you to understand how to create a Repository Pattern that is mainly used for large enterprise application. The Repository pattern divides the application’s UI, components of data access and business logic into several layers which are easy to test and maintain. A Employees application will be created which will... » read more