Jayanti Bose
Jayanti Bose

Reputation: 57

Difference between MVC View Page and MVC View Content Page

When to use MVC View Page and MVC View Content Page? What is the difference between them?

Upvotes: 2

Views: 2506

Answers (2)

Sendhil Kumar
Sendhil Kumar

Reputation: 13

The MVC View Page is for creating a page, the MVC View Content Page is used when you want to create a page and specify a Master Page with it.

Upvotes: 1

Dot Net Developer
Dot Net Developer

Reputation: 198

**The MVC View Page is for creating a page, the MVC VewP Content Page is used when you want to create a page and specify a Master Page with it.

It's the same as ASP.NET Webforms Web Form and Web Content Form.

ViewPage and ViewContentPage are the same thing. The difference is that ViewContentPage expects to be the content of a master page and when you select a ViewContentPage it prompts you to select a master file.

The end result is that a page that derives from the class page is created and in the instance of a regular ViewPage the html in the page starts with an Html tag and in the case of a ViewContentPage the html starts with an asp:Content tag**

Upvotes: 4

Related Questions