EnvironmentTagHelper conditionally renders an element and its content for selected hosting environments. It keeps environment-specific markup declarative and easier to read than embedding C# conditionals in Razor markup. section 18.5 section 18.6
Unlike Tag Helpers that add attributes to existing elements, this helper owns the entire element. The include attribute lists the environments in which the enclosed markup should appear. section 18.5
Show a warning outside production
<environment include="Testing,Staging"> <div class="warning">You are currently on a testing environment</div> </environment> The warning appears in Testing and Staging environments, making it easier to distinguish those deployments from production. section 18.5
Figure 18.11 The warning banner will be shown whenever you’re running in a testing environment, to make it easy to distinguish from production.
Use the environment banner as a visible deployment signal while developing and testing the application. section 18.5
