728x90
반응형
Form Tag Helper의 Attributes
- asp-controller
- asp-action
- asp-route
- asp-all-route-data
- asp-route-{value}
- asp-area
- asp-fragment
- asp-page
- asp-page-handler
<form asp-controller="Home" asp-action="Index"></form>
<form asp-route="default"></form>
Environment Tag Helper
Environment Tag Helper는 <environment> HTML tag에 적용된다. ASPNETCORE_ENVIRONMENT 환경 변수 값에 따라서 렌더링한다.
ASPNETCORE_ENVIRONMENT 환경 변수 참조 글 : https://bigexecution.tistory.com/105
관례상, 환경변수는 Development, Staging, Production 3가지 이지만 사용자가 추가도 가능하다.
Environment Tag Helper의 Attributes
- include
<environment include="Staging,Production">
<strong>IWebHostEnvironment.EnvironmentName is Staging or Production</strong>
</environment>
- exclude
<environment exclude="Development">
<strong>IWebHostEnvironment.EnvironmentName is not Development</strong>
</environment>
- names
<environment names="Staging,Production">
<strong>IWebHostEnvironment.EnvironmentName is Staging or Production</strong>
</environment>
728x90
반응형
'ASP.NET Core' 카테고리의 다른 글
.NET 6 API with Redis] 1. Redis란? (0) | 2022.05.18 |
---|---|
ASP.NET Core] Model Binding 모델 바인딩 (0) | 2022.02.03 |
ASP.NET Core] Input Tag Helper (0) | 2022.01.25 |
ASP.NET Core] Tag Helper (0) | 2022.01.25 |
ASP.NET Core 6] Route Constraints 경로 제약 조건 (0) | 2022.01.25 |
댓글