Predefined File Templates for Razor (C#)
This topic lists all predefined file templates for Razor (C#) in JetBrains Rider 2021.2. For more information about file templates, see Create files from templates
Template | Details |
---|---|
| Razor MVC Partial View Scope Razor (C#) projects, Razor (C#) Views folder Body @model $model$
$END$ Parameters
|
| Razor MVC View Scope Razor (C#) projects, Razor (C#) Views folder Body @model $model$
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<title>$title$</title>
</head>
<body>
<div>
$END$
</div>
</body>
</html> Parameters
|
| Razor MVC View with Layout Scope Razor (C#) projects, Razor (C#) Views folder Body @model $model$
@{
ViewBag.Title = "$title$";
Layout = "$_Layout$";
}
<h2>$title$</h2>
$END$ Parameters
|
| Scope Razor ASP.NET Framework projects Body $HEADER$using System.Web.Mvc;
namespace $NAMESPACE$
{
public class $CLASS$: Controller
{
// GET
public ActionResult Index()
{
$END$return View();
}
}
} Parameters
|
| Scope Blazor (C#) Projects Body <h3>$COMPONENTNAME$</h3>
@code {
$END$
} Parameters
|
| Scope Blazor (C#) Projects Body @page "/$PAGENAME$"
<h3>$PAGENAME$</h3>
@code {
$END$
} Parameters
|