{"id":12144,"date":"2011-12-21T11:56:45","date_gmt":"2011-12-21T11:56:45","guid":{"rendered":"https:\/\/www.techopedia.com\/definition\/view-mvc\/"},"modified":"2011-12-21T12:31:50","modified_gmt":"2011-12-21T12:31:50","slug":"view-mvc","status":"publish","type":"definition","link":"https:\/\/www.techopedia.com\/definition\/27453\/view-mvc-aspnet","title":{"rendered":"View (MVC)"},"content":{"rendered":"
A View, in the context of a Model View Controller (MVC) architecture, is a software class that contains a template and data form and produces a response for the browser. It receives data from the Controller of the MVC and packages it and presents it to the browser for display.<\/p>\n
The View is not very autonomous -it is like a black box where some data is thrown at it and it gives a display to the user in a browser friendly manner. It collects the input data from data sources, finds the template upon invocation, and combines them into HTML output at runtime.<\/p>\n
The way the Controller passes data down to the View is through a dictionary called a ViewData dictionary. This dictionary contains the packaged results which end up being converted to the resulting HTML output.<\/p>\n
The output from a View is usually HTML, however it can also be defined to give other view results such as JSON strings and JavaScript code.\n<\/p>\n
The View is a common aspx file which would contains the relevant controls of the specific ASP.NET application. A View can be shared by multiple controllers and can be partial or strongly typed. The partial view is analogous to controls in webforms and is rendered through the ViewUserControl class.<\/p>\n
If a View is not a partial view it would be a master page. This masterpage is similar to the masterpage in webforms; however, it is located under the ViewShared folder. A strongly typed View is isolated from the Controller and the data can be passed in two distinct ways either through the ViewData dictionary or via an object model.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"
What Does View (MVC) Mean? A View, in the context of a Model View Controller (MVC) architecture, is a software class that contains a template and data form and produces a response for the browser. It receives data from the Controller of the MVC and packages it and presents it to the browser for display. […]<\/p>\n","protected":false},"author":7813,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_lmt_disableupdate":"","_lmt_disable":"","om_disable_all_campaigns":false,"footnotes":""},"definitioncat":[246,227,216],"class_list":["post-12144","definition","type-definition","status-publish","format-standard","hentry","definitioncat-api-management","definitioncat-data-management","definitioncat-software-development"],"acf":[],"yoast_head":"\n