Error executing template "/Designs/hydrema/Paragraph/item-productboxes-products.cshtml"
System.FormatException: Input string was not in a correct format.
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
   at System.Convert.ToInt32(String value)
   at CompiledRazorTemplates.Dynamic.RazorEngine_01832877de5b47b999eb0386d66a2924.Execute() in E:\dynamicweb.net\Solutions\hydrema2014.net.dynamicweb-cms.com\files\Templates\Designs\hydrema\Paragraph\item-productboxes-products.cshtml:line 44
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @{ 2 int productcount = GetLoop("Item.ProductLinks").Count; 3 string boxclass = ""; 4 string categoryclass = ""; 5 string columnclass = ""; 6 7 if (productcount == 1) { 8 boxclass = "sp-full showhide backhoe"; 9 categoryclass = "bx-title1 showhide backhoe"; 10 columnclass = "col-full"; 11 } else { 12 boxclass = "showhide dump-trucks"; 13 categoryclass = "bx-title1 showhide dump-trucks"; 14 columnclass = "col3"; 15 } 16 } 17 <div class="container"> 18 <div class='@columnclass'> 19 <article class='@categoryclass'> 20 <div class="title-block"> 21 <h3>@GetValue("Item.Header")</h3> 22 <h4>@GetValue("Item.Subheader")</h4> 23 </div> 24 <span class='@GetValue("Item.Icon")'></span> 25 <div class="bx-text"> 26 @GetValue("Item.Text") 27 </div> 28 </article> 29 @foreach (var product in GetLoop("Item.ProductLinks")) { 30 string ButtonLink = product.GetString("Item.ProductLinks.ButtonLink"); 31 32 <article class='@boxclass'> 33 <div class="bx-text"> 34 <h2>@product.GetValue("Item.ProductLinks.Header")</h2> 35 @if (!string.IsNullOrWhiteSpace(product.GetString("Item.ProductLinks.Subheader"))) { 36 <p><a>@product.GetString("Item.ProductLinks.Subheader").Replace(" / ", "</a> / <a>")</a></p> 37 } 38 @{ 39 string strnavpageid = product.GetString("Item.ProductLinks.NavigationLink"); 40 int navpageid = 0; 41 42 if (!string.IsNullOrWhiteSpace(strnavpageid)) { 43 strnavpageid = strnavpageid.Substring(strnavpageid.ToUpper().IndexOf("ID=") + 3); 44 navpageid = Convert.ToInt32(strnavpageid); 45 } 46 } 47 48 @if (!string.IsNullOrWhiteSpace(strnavpageid) && !string.IsNullOrWhiteSpace(product.GetString("Item.ProductLinks.NavigationLink"))) { 49 @RenderNavigation(new { 50 template = "p.xslt", 51 expandmode = "all", 52 id = "productnavigation", 53 startlevel = 1, 54 endlevel = 2, 55 parentid = navpageid 56 }) 57 } 58 59 <a href="@ButtonLink" @(product.GetBoolean("Item.ProductLinks.NewWindow") ? "target='_blank'" : null) class="bt bt-gray"><span>@product.GetValue("Item.ProductLinks.ButtonText")</span></a> 60 </div> 61 <span class="bn-full"> 62 @if (GetGlobalValue("Global:Device.IsMobile").ToString() == "True") { 63 <img src='@("/admin/public/getimage.ashx?Image=")@product.GetValue("Item.ProductLinks.Image")@("&Width=320&compression=300")' alt='@(!string.IsNullOrWhiteSpace(product.GetString("Item.ProductLinks.ImageAlternativeText")) ? product.GetString("Item.ProductLinks.ImageAlternativeText") : product.GetValue("Item.ProductLinks.Header"))' /> 64 } else { 65 <img src='@product.GetValue("Item.ProductLinks.Image")' alt='@(!string.IsNullOrWhiteSpace(product.GetString("Item.ProductLinks.ImageAlternativeText")) ? product.GetString("Item.ProductLinks.ImageAlternativeText") : product.GetValue("Item.ProductLinks.Header"))' /> 66 } 67 </span> 68 </article> 69 } 70 </div> 71 </div> 72
icon-pin Find us
icon-request Request
icon-contact Contact
Request
A callback
icon-arrow-down

Do you have a question regarding our machines or services? Or would you like to be contacted by your local sales representative? Please fill in the form.

Main number +45 9837 1333

hydrema@hydrema.com Gl. Kirkevej 16
DK-9530 Støvring