---
title: "Working with View in ASP.NET MVC"  
description: "Hi everyone in this post I’m explaining about implementing of view in MVC 4."  
author: "Anonymous User"  
published: 2015-02-11  
updated: 2019-09-07  
canonical: https://www.mindstick.com/articles/1574/working-with-view-in-asp-dot-net-mvc  
category: "asp.net mvc"  
tags: ["c#", "mvc4", "view"]  
reading_time: 3 minutes  

---

# Working with View in ASP.NET MVC

Working with [View in ASP.NET](https://www.mindstick.com/forum/33955/how-to-create-a-partial-view-in-asp-dot-net-mvc-4) MVC

Hi everyone in this post I’m explaining about implementing of view in MVC 4.

In my previous post I’ll intruduced about URL [Routing in MVC](https://www.mindstick.com/forum/12971/how-to-change-url-using-url-routing-in-mvc) 4\

## Description:

The ASP.NET [MVC Framework](https://www.mindstick.com/forum/34038/how-to-work-with-checkbox-in-asp-dot-net-mvc-framework) allows building a [web application](https://www.mindstick.com/articles/13069/progressive-web-application-pwas-all-you-need-to-know-about). Mvc is divided into three part Model, View, Controller. In this post I’ll explain about implementing view. The view role can be implemented in several ways. The popular view engines used in the ASP.NET MVC 4 Framework are the **Razor view engine**. If you want to learn more about Controller read my previous post **Working with Controller.**

Any application is stand on three piller

1. [Presentation layer](https://answers.mindstick.com/blog/23/drile-down-about-the-presentation-layer-in-osi-model) ([User Interface](https://www.mindstick.com/blog/302016/what-is-user-interface-and-what-are-its-benefits))

2. [Business Logic](https://answers.mindstick.com/qa/30543/what-is-business-logic)

3. Data Access Layer

If you design user interface in mvc you should use View.

firstly create a [MVC Application](https://www.mindstick.com/articles/23249/rdlc-report-in-mvc-application).

Open [visual studio](https://www.mindstick.com/articles/12378/visual-studio-for-mac-is-out-of-beta-preview-now-officially-available) >> File >> New Project >> ASP.NET MVC 4 Web Application

![Working with View in ASP.NET MVC](https://www.mindstick.com/mindstickarticle/14f72f30-4fe2-45da-9d05-93a5f600d0fe/images/9e85282d-2fef-4eec-aec5-8d21d1f21183.png)

And give the application name and click ok after click ok open a window and you select project type **Empty**

![Working with View in ASP.NET MVC](https://www.mindstick.com/mindstickarticle/14f72f30-4fe2-45da-9d05-93a5f600d0fe/images/b1904f80-071a-4b91-b97f-52392030e731.png)

Now an empty project is buildup successfully fallowing folder structure is created.

![Working with View in ASP.NET MVC](https://www.mindstick.com/mindstickarticle/14f72f30-4fe2-45da-9d05-93a5f600d0fe/images/2c8b8bfe-8c5e-4f4c-b635-726d2b76227f.png)

If you want to some message in well-formed then you add a view in View/Home folder and write appropriate message. Now you run your application that time our application generate a error **resource cannot be found** because when run application that time search default controller and default action if you want to change default value of controller and default value of action this is part of URL Routing if you want learn more about URL Routing read my previous post **URL Routing in MVC4.**

Now add a HomeController in Controller folder. And define a Index Action method folder structure is below.

![Working with View in ASP.NET MVC](https://www.mindstick.com/mindstickarticle/14f72f30-4fe2-45da-9d05-93a5f600d0fe/images/32794b40-2903-46cb-98cd-486872c72cbe.png)

Now run [your application](https://answers.mindstick.com/qa/95487/how-do-you-troubleshoot-when-your-application-link-is-not-responding) and get a appropriate message.

![Working with View in ASP.NET MVC](https://www.mindstick.com/mindstickarticle/14f72f30-4fe2-45da-9d05-93a5f600d0fe/images/9b398e85-5d60-467b-ae4f-29858be3b802.png)

If you want to return different view **Index** action then you return view name like this.

public ActionResult Index()

{

return View("Welcome");

}

Now add a Welcoe View in **View/Home** folder and run application.

![Working with View in ASP.NET MVC](https://www.mindstick.com/mindstickarticle/14f72f30-4fe2-45da-9d05-93a5f600d0fe/images/89e8f82a-5b9b-4b3c-bb69-172b4e5cdb19.png)

You can use Layout page in view as like master page. In my view all information is static. If you work with dynamic data in view then you add a model. In my next post I’ll discus about about model **Working with Model.**

---

Original Source: https://www.mindstick.com/articles/1574/working-with-view-in-asp-dot-net-mvc

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
