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}}
Logic like you're trying to do has to be in a helper function. You can't put relational operators like that directly into a handlebars template. It is designed that way on purpose. Helpers are very easy to create and use. See http://handlebarsjs.com/#helpers more more info.
Do this in the template
so here you are passing your value to a helper function and doing your comparison..