Create pages and controls
The DotVVM Command Line tool can create new pages, master pages, or markup controls in ASP.NET Core projects.
Creating pages, master pages, and controls is suported only in ASP.NET Core projects using the new project system. For .NET Framework projects, we recommend using Visual Studio.
Supported commands
Task | Short Syntax | Long Syntax | Options |
---|---|---|---|
Create Page | dotnet dotvvm ap |
dotnet dotvvm add page |
|
Create Master Page | dotnet dotvvm am |
dotnet dotvvm add master |
|
Create Markup Control | dotnet dotvvm ac |
dotnet dotvvm add control |
|
Example
- Create the
Views/Site.dotmaster
master page:
dotnet dotvvm add master Site
- Create the
Views/Page1.dothtml
page and embed it in theViews/Site.dotmaster
:
dotnet dotvvm add page Page1 -m Site
- Create the
Controls/MyControl.dotcontrol
user control with the code behind file:
dotnet dotvvm add control Controls/MyControl.dotcontrol -c