How to use ? : if statements with Razor and inline code blocks

前端 未结 4 485
再見小時候
再見小時候 2020-12-07 15:26

I\'m updating my old .aspx views with the new Razore view engine. I have a bunch of places where I have code like this:



        
4条回答
  •  情书的邮戳
    2020-12-07 15:47

    The key is to encapsulate the expression in parentheses after the @ delimiter. You can make any compound expression work this way.

提交回复
热议问题