Hi All,
in the HomepageProducts.cshtml file it's calling an extension method called Html.DataList which has a signature of:
public static IHtmlString DataList<T>(this HtmlHelper helper, IEnumerable<T> items, int columns,
Func<T, HelperResult> template)
where T : class
{
}
@(Html.DataList<ProductModel>(Model.Products, 2,
@<div class="item-box">
@Html.Partial("_ProductBox", @item)
</div>
))
just wondering if someone can explain how @<div class="item-box">@Html.Partial("_ProductBox", @item)</div>
is a Func<T, HelperResult> ??
doesn't really make sense.. I'd love to ultimately strip the <div class="item-box"> out and just have
@(Html.DataList<ProductModel>(Model.Products, 2,
@Html.Partial("_ProductBox", @item)
))
im not sure what the @ and markup does... i've seen @:
but not just @<div>
Thanks,
Tom