View ASP.NET MVC

View ASP.NET MVC

Introduction

A view in MVC handles the user's data and presentation. View is an HTML template of Razor markup. A view can display whatever you want to display to the user. You can write C# and HTML code in the view.

Types of View

1.Layout View

2.Partial View

3.Strongly Type View

4.Razor View

· Layout view

Layout view is also called as master page. In the layout view, you have to show the same page in all the views, keeping all the views in that page, you can use that page wherever you want to use that page.

(Having multiple views in one page and using that page where you want to use it is called layout view)


· Partial view

A partial view consists of one view. If you want to use the page in different views, you can make that page a partial view and use that page where you want to use it.



· Strongly Type View

Inside our view, if we want to show a property of a model in a data view, we make that view a strongly typed view.


· Razor view

Use of Razor View If we want to write C# code inside the view, we use Razor View. With the help of Razor View, C# code can be easily written in the view Razor View Syntax is @ Razor Syntax understands what the user is typing.


Previous Next

Start Your Data Journey Today With MSAInfotech

Take the first step towards data-led growth by partnering with MSA Infotech. Whether you seek tailored solutions or expert consultation, we are here to help you harness the power of data for your business. Contact us today and let’s embark on this transformative data adventure together. Get a free consultation today!

We utilize data to transform ourselves, our clients, and the world.

Partnership with leading data platforms and certified talents

FAQ Robot

How Can We Help?

Captcha

MSA Infotech