PageRenderTime 22ms CodeModel.GetById 18ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Kona.Web/Views/Shared/FeaturedProduct.ascx

#
ASP.NET | 12 lines | 10 code | 2 blank | 0 comment | 2 complexity | 8d5cdeebf7bfe65fa64c6e525eb3d04b MD5 | raw file
Possible License(s): BSD-3-Clause
 1<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Widget<IList<Product>>>" %>
 2
 3<%
 4    if(Model.Data.Count>0){
 5        var Product = Model.Data[0]; %>
 6        <a href="<%=Url.Action("Show","Home",new{sku=Product.SKU}) %>">
 7             <img src="/content/images/<%=Model.Body%>" />
 8        </a>
 9    <%}else{ %>
10     
11     <img src="/content/images/<%=Model.Body == "" ? "placeholder.png" : Model.Body %>" />
12    <%} %>