Exception in template (Designs/HiCon2016/_parsed/referenceview.parsed.cshtml): System.InvalidOperationException: Sequence contains no elements
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   at CompiledRazorTemplates.Dynamic.ecbfceeaaebfda.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context)
   at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag)
   at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName)
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()
@{ string siteLang = GetString("LongLang").Substring(3,2); if (siteLang == "GB") { siteLang = "EN"; } if (siteLang == "US") { siteLang = "GROUP"; } string home = ""; switch (siteLang) { case "DK": home = "Default.aspx?ID=3"; break; case "EN": home = "Default.aspx?ID=177"; break; case "NL": home = "Default.aspx?ID=508"; break; case "FI": home = "Default.aspx?ID=642"; break; case "GROUP": home = "Default.aspx?ID=776"; break; default: home = ""; break; } } <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta name="viewport" content="maximum-scale=1,width=device-width,initial-scale=1,user-scalable=0"> <title>@GetValue("Title")</title> @GetValue("MetaTags") @GetValue("CopyRightNotice") <script src="https://use.typekit.net/mng5asx.js"></script> <script>try{Typekit.load({ async: true });}catch(e){}</script> <!-- fav icon --> <link rel="shortcut icon" href="/Files/Templates/Designs/HiCon2016/assets/img/favicon.ico" type="image/x-icon"> <link rel="icon" href="/Files/Templates/Design/HiCon2016/assets/img/favicon.ico" type="image/x-icon"> <link rel="stylesheet" href="/Files/Templates/Designs/HiCon2016/assets/css/main.css" type="text/css"> <!--Snippet(stylesheets)--> <script type="text/javascript" src="/Files/Templates/Designs/HiCon2016/assets/js/jquery-2.2.4.min.js"></script> @GetValue("Stylesheets") @GetValue("Javascripts") </head> <body> @(GetValue("Item.Area.Analytics")) <div class="header navbar-fixed-top"> <div class="lang_menu"> <div class="favorites" id="display-favorites"> <i class="glyphicon glyphicon-star-empty"></i> @(Translate("favorites")) </div> <div class="lang"> @siteLang </div> <div class="navigation_expand navigation_expand_lang"> @* <div class="lang"> EN </div> *@ @foreach(LoopItem lang in GetLoop("Languages")) { string CultureCode = lang.GetString("Culture").Substring(3,2); if (CultureCode == "GB") { CultureCode = "EN"; } if (CultureCode == "US") { CultureCode = "GROUP"; } if ( !lang.GetBoolean("IsCurrent") ) { <a class="lang" href='/Default.aspx?ID=@lang.GetString("PageID")'>@CultureCode</a> } } </div> <div class="menu"> <i class="glyphicon glyphicon-menu-hamburger"></i> Menu </div> </div> @{ string Logo = "/Files/Templates/Designs/HiCon2016/assets/img/hi-con-logo_hvid_R.png"; string ItemLogo = GetString("Item.Area.Logo"); if( !string.IsNullOrEmpty( ItemLogo ) ) { Logo = ItemLogo; } } <div class="container"> <div class="row"> <div class="col-xs-6"> <a href="/@home"><img src="@(Logo)" class="img-responsive"></a> </div> </div> </div> <div class="navigation_expand navigation_expand_menu"> @GetValue("DwNavigation(mainnavigationsite)") </div> </div> <div class="favorites-list"> <div class="container"> <div class="row"> <div class="col-xs-12"> <h2>@(Translate("favorites"))</h2> </div> </div> <div class="row favorites-list-elements"> </div> <div class="row"> <div class="col-xs-12"> <div class="send-to-mail"> <div class="holder"> <input type="text" name="mail" id="mail" class="mail" placeholder='@(Translate("enter_mail"))'><button class="send-mail-button" name="send-mail-btn" id="send-mail-btn">@(Translate("send_to_mail"))</button> </div> </div> </div> </div> </div> </div> @GetValue("Title(Reference view page)") @GetValue("Description(Use this page to view references.)") <div id="reference-slide" class="carousel slide" data-ride="carousel"> <!-- Indicators --> <ol class="carousel-indicators"> @{ int topIndexs = 0; } @foreach(LoopItem img in GetLoop("Item.Billeder") ) { string classAdde = ""; if( topIndexs == 0 ) { classAdde = "active"; } <text> <li data-target="#reference-slide" data-slide-to='@(topIndexs)' class="@(classAdde)"></li> </text> topIndexs++; } </ol> <!-- Wrapper for slides --> <div class="carousel-inner" role="listbox"> @{ int topIndex = 0; } @foreach(LoopItem img in GetLoop("Item.Billeder") ) { string classAdd = ""; if( topIndex == 0 ) { classAdd = "active"; } <text> <div class="item @(classAdd)"> <img src='/Admin/Public/GetImage.ashx?Image=@(img.GetValue("Item.Billeder.Billede"))&Format=jpg&Width=1920&Height=980&Compression=99'> </div> </text> topIndex++; } <div class="mouse"></div> </div> </div> <div class="reference-page"> <div class='section double-padding-top double-padding-bottom' style="background-color:#ffffff"> <div class="container"> <div class="row text-content main-info"> <div class="col-md-12"> <b>@(GetValue("Item.By"))</b> <h1>@(GetValue("Item.Projektnavn"))</h1> <div class="project-location"> <a href='http://maps.google.com/maps?q=@(GetValue("Item.Breddegrad")),@(GetValue("Item.L_ngdegrad"))'> <i class="glyphicon glyphicon-map-marker"></i> <span class="location">Google Maps</span> </a> </div> </div> </div> </div> </div> <div class='section double-padding-top double-padding-bottom' style="background-color:#f4f4f4"> <div class="container"> <div class="row text-content"> <div class="col-md-4"> <h2 class="subline">@Translate("project_details","Projektdetaljer")</h2> </div> <div class="col-md-4 list-info general"> @if(!string.IsNullOrEmpty( GetString("Item.Entrepren_r") )) { <text> <p> <b>@(Translate("contractor","Entreprenør")):</b> <br> @(GetValue("Item.Entrepren_r")) </p> </text> } @if(!string.IsNullOrEmpty( GetString("Item.Bygge_r") )) { <text> <p> <b>@(Translate("build_year","Byggår")):</b> <br> @(GetValue("Item.Bygge_r")) </p> </text> } @if(!string.IsNullOrEmpty( GetString("Item.Arkitekt") )) { <text> <p> <b>@(Translate("architect","Arkitekt")):</b> <br> @(GetValue("Item.Arkitekt")) </p> </text> } @if(!string.IsNullOrEmpty( GetString("Item.Ingeni_r") )) { <text> <p> <b>@(Translate("engineer","Ingeniør")):</b> <br> @(GetValue("Item.Ingeni_r")) </p> </text> } @if(!string.IsNullOrEmpty( GetString("Item.Bygherre") )) { <text> <p> <b>@(Translate("developer","Bygherre")):</b> <br> @(GetValue("Item.Bygherre")) </p> </text> } </div> <div class="col-md-4 list-info"> @(GetValue("Item.Beskrivelse")) </div> </div> </div> </div> <div class="section double-padding-top double-padding-bottom colortransparent" style="background-color:transparent;"> <div class="container"> <div class="row text-content"> <div class="col-md-6"> <h2 class="subline bot-cont">@(Translate("Downloads","Downloads"))</h2> @if( GetLoop("Item.Downloads").Count() > 0 ) { <text> <div class="download-section"> <ul> @foreach( var dl in GetLoop("Item.Downloads") ) { <text> <li> <a href='@(dl.GetValue("Item.Downloads.Fil"))' target="_BLANK"> @(dl.GetValue("Item.Downloads.Titel")) </a> </li> </text> } </ul> </div> </text> } else { <p>@(Translate("no_downloads","Ingen downloads tilgængelige") )</p> } </div> <div class="col-md-3"> <h2 class="subline bot-cont">@(Translate("Kontakt","Kontakt"))</h2> <p>@(Translate("contact_Text","Fortæl os om dine drømme om spektakulære designs og innovative produkter, hvad enten det gælder nybyg eller renovering. Sammen kan vi udnytte de store potentialer, der er til stede i højstyrkebeton"))</p> </div> <div class="col-md-3"> <div class="contacts"> <div class="contact"> <div class="image"> <img src='/Admin/Public/GetImage.ashx?Image=@(GetLoop("Item.Kontaktperson").First().GetValue("Item.Kontaktperson.Billede"))&amp;Format=jpg&amp;Width=532&amp;Height=532&amp;Compression=99' class="img-responsive"> </div> <div class="info"> <span class="name">@(GetLoop("Item.Kontaktperson").First().GetValue("Item.Kontaktperson.Navn"))</span><br> <span class="department infoe">@(GetLoop("Item.Kontaktperson").First().GetValue("Item.Kontaktperson.Stilling"))</span><br><br> <span class="phone infoe"><a href='tel:+45@(GetValue("Item.Kontaktperson.Telefon"))'>+45 @(GetLoop("Item.Kontaktperson").First().GetValue("Item.Kontaktperson.Telefon"))</a></span><br> <span class="email infoe"><a href='@(GetValue("Item.Kontaktperson.Email"))'>@(GetLoop("Item.Kontaktperson").First().GetValue("Item.Kontaktperson.Email"))</a></span> </div> </div> </div> </div> </div> </div> </div> </div> <div class="wrapper" id="main-content">@GetValue("DwContent(maincontent)")</div> <div class="footer"> <div class="container"> <div class="row subline"> <div class="col-xs-10"> @GetValue("DwNavigation(footernavigationsite)") </div> <div class="col-xs-2 text-right"> <p>CVR 2602 0387</p> </div> </div> <div class="row"> <div class="col-xs-6"> <img src="/Files/Templates/Designs/HiCon2016/assets/img/hicon_logo_grey.png" class="img-responsive logo"> </div> <div class="col-xs-6"> <ul class="social"> @if(!string.IsNullOrEmpty(GetString("Item.Area.FacebookLink"))) { <li><a href='@GetValue("Item.Area.FacebookLink")'><img src="/Files/Templates/Designs/HiCon2016/assets/img/soc_facebook.png" class="img-responsive"></a></li> } @if(!string.IsNullOrEmpty(GetString("Item.Area.PinterestLink"))) { <li><a href='@GetValue("Item.Area.PinterestLink")'><img src="/Files/Templates/Designs/HiCon2016/assets/img/soc_pinterest.png" class="img-responsive"></a></li> } @if(!string.IsNullOrEmpty(GetString("Item.Area.LinkedInLink"))) { <li><a href='@GetValue("Item.Area.LinkedInLink")'><img src="/Files/Templates/Designs/HiCon2016/assets/img/soc_linkedin.png" class="img-responsive"></a></li> } @if(!string.IsNullOrEmpty(GetString("Item.Area.TwitterLink"))) { <li><a href='@GetValue("Item.Area.TwitterLink")'><img src="/Files/Templates/Designs/HiCon2016/assets/img/soc_twitter.png" class="img-responsive"></a></li> } <!--<li><a href="#"><img src="assets/img/soc_facebook.png" class="img-responsive"></a></li> <li><a href="https://dk.pinterest.com/hiconcrete/"><img src="assets/img/soc_pinterest.png" class="img-responsive"></a></li> <li><a href="https://www.linkedin.com/company/hi-con-a-s?trk=company_logo"><img src="assets/img/soc_linkedin.png" class="img-responsive"></a></li> <li><a href="#"><img src="assets/img/soc_instagram.png" class="img-responsive"></a></li>--> </ul> </div> </div> </div> </div> <!-- Scripts --> <script type="text/javascript" src="/Files/Templates/Designs/HiCon2016/assets/js/bootstrap-3.3.7.min.js"></script> <script type="text/javascript" src="/Files/Templates/Designs/HiCon2016/assets/js/packery-2.1.1.min.js"></script> <script type="text/javascript" src="/Files/Templates/Designs/HiCon2016/assets/js/main.js"></script> <!--Snippet(javascripts)--> @* @foreach(LoopItem lang in GetLoop("Languages")) { <script>console.log(@(new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(lang.Values)));</script> } @foreach(LoopItem lang in GetLoop("WebsiteLanguages")) { <script>console.log(@(new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(lang.Values)));</script> } *@ </body> </html>