HandleBars .Net If Comparision
问题 I use Handlebars .NET for my mail templates so i generate template at server side width ASP.NET MVC. I need a comparision like this. But it doest't work? What can I do? //Product.ProdType is a enum property {{#if (Product.ProdType=='BlaBlaBla')}} <p>This is a test</p> {{/if}} 回答1: I had the same problem and I created a helper function "ifCond" that works with numeric data types and string. It can be optimized or expanded to work with other types. Handlebars.RegisterHelper("ifCond", (writer,