title: Count item it partial view in View of asp.net mvc
body: <p>I have one view in my asp.net mvc project :</p>
  
  <pre><code> &lt;div id="featured"&gt;
         &lt;% Html.RenderPartial("../Shared/UserControls/RelatedProduct", Model.ProductDetail); %&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code> public ActionResult ProductSpec(int id, int dep, int cat, int tab)
   {
      var pvc = new CMSViewModel()
      {
         ItemDetail = new ProductVM()
         {
            GetItemReference = DataContext.GetItemReferences()
         }
      };
      return View(pvc);
  }
  </code></pre>
  
  <p>This is my partial view :</p>
  
  <pre><code>&lt;%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl&lt;Web.ModelView.ProductVM&gt;" %&gt;
      &lt;ul class="ui-tabs-nav"&gt;
      &lt;%        
          for(int i=0; i&lt;(Model.GetItemReference.Count());i++) {
             //list all item from model
          } 
      %&gt;
      &lt;/ul&gt;
  </code></pre>
  
  <p>The problem : When the item in partial view is empty, View will be blank.
  I want to count the partial view item in View, So if it blank, I will replace it with the other Null Image.</p>
  
  <p>Could any one tell me how could I count the item in the partial view in View.</p>