Clean way to return an empty mvc partial view

asp.net-mvc, asp.net-mvc-partialview, c#

Solution

I have been using

return Content("");

and is working fine.

Problem

In cshtml file, based on a condition, what's the best way to return an empty partialview ? Right now I have: ``` @if(Model.Count() > 0) { loooonng partial view block of markup code } ``` How can I re-do it to look cleaner closer to this: ``` @if(Model.Count() == 0) { render an empty partial view } loooonng partial view block of markup code goes here <- This will obviously get executed only if Model.Count() > 0 ``` Thanks in advance !

Original source

Related problems