Home > MVC > ASP.Net MVC Redirect To A Different View with Example



ASP.Net MVC Redirect To A Different View with Example

In this article, we will explain how to Redirect To A Different View in ASP.NET MVC with an example and sample code.


In this article, we will explain how to Redirect To A Different View in ASP.NET MVC with an example and sample code. In this example, we have created a sample login page, and based on Login we are redirecting to the action method.

 

Step -1

Open Visual Studio. Click on the file in the menu and select new Project .

ASP.Net MVC Redirect To A Different View

 

Step -2

Select new project type.

ASP.Net MVC Redirect To A Different View

 

Login.cshtml

We have provided razor view html below.

 

Models

 

RedirectController

we are redirecting to another action method dashboard .

 

dashboard.cshtml

 

Screenshot

ASP.Net MVC Redirect To A Different View with Example

 




Note: All contents are copyright of their authors.



Comments



Leave a Reply

Comment:*
Email ID:*


Name:*