title: Razor MVC partial view cannot find end of code blocks and LI tags
body: <p>I have a partial view that is not rendering:</p>
  
  <p>The designer is telling me 
       the foreach(Dress d in Model) is missing a closing character "}"
       the foreach(Picture p in d.Pictures) is missing a closing character "}"
       and the LI item is not closed</p>
  
  <pre><code>@model IEnumerable&lt;MyApp.Model.Dress&gt;
  
          &lt;ul class="thumbs noscript"&gt;
              @{                                                              
                  foreach (Dress d in Model)
                  { 
                      foreach(Picture p in d.Pictures)      
                      {                      
                          string dressPrefix = "images/Dresses/"+p.Dress.DressName;
                          string bigThumb = dressPrefix+"-"+p.Caption+"_bigthumb.jpg";
                          string thumb = dressPrefix+"-"+p.Caption+"_thumb.jpg";
                          string dressTitle = d.DressName+" "+d.Price.ToString();
  
                      &lt;li&gt;
                          &lt;a class="thumb" href="@bigThumb" title="@dressTitle"&gt;
                              &lt;img src="@thumb" alt=""@dressTitle" /&gt;
                          &lt;/a&gt;
                      &lt;/li&gt;                                                        
                      }
                  }
              }
          &lt;/ul&gt;
  
   public class Dress
      {
          public int ID { get; set; }
          public int GalleryTypeID { get; set; }
          public virtual GalleryType GalleryType { get; set; }
          public int DressTypeID { get; set; }
          public virtual DressType DressType { get; set; }
          public int DesignerID { get; set; }
          public virtual Designer Designer { get; set; }
          public string Description { get; set; }
          public string DressName { get; set; }
          public string Bust { get; set; }
          public int DressLength { get; set; }
          public int SleeveLength { get; set; }
          public decimal Price { get; set; }
          public int Waist { get; set; }
          public int test { get; set; }
  
          public virtual ICollection&lt;DressColor&gt; DressColors { get; set; }
          public virtual ICollection&lt;Picture&gt; Pictures { get; set; }
  
      }
  
  public class Picture
  {
      public int ID { get; set; }
      public Dress Dress { get; set; }
      public string Caption { get; set; }
      public string PictureURL { get; set; }
  }
  </code></pre>
  
  <p>Any ideas?</p>