I want to create a simple HtmlHelper to that I can use like this:
@using(Html.DisplayIf(Object object))
{
...
}
I tried the method suggested here, but unlike the guy who asked that question I would like the content between the brackets not to be rendered at all, not just hidden.
Is there a way to prevent the textwriter from writing the content between the brackets, or some other method that would be appropriate to solve my problem?