title: Is there a way to prevent a plain text section of an MVC view from rendering?
body: <p>I have a web application I'm working on, and I'd like to avoid the clutter of if/elseif/else in the view, and of having way too many separate ascx files just for conditional inclusion in a view.</p>
  
  <p>What I want to do is create some sort of simple class that works like so (an example will demonstrate what I'd like to achieve)</p>
  
  <pre><code>&lt;% using(RequiresAccessTo.Feature(Features.FancyStuff)) { %&gt;
  Special content for users
  &lt;% } %&gt;
  </code></pre>
  
  <p>If the user does <em>not</em> have access to the feature, the class would render a sign up link instead. I know I could simply use if/else, but the content of the else block could be one of 2-3 different standard responses depending on access level, and this mechanism would be used in countless places around the website.</p>
  
  <p>If there a way to simply prevent <em>Special content for users</em> from rendering altogether, it'll mean I can make the templates around the website really easy to maintain.</p>