ASP.NET MVC 3 using Razor - use conditional expression together with the HTML output

前端 未结 1 864
别那么骄傲
别那么骄傲 2021-01-18 06:13

I\'ve been bugged with this for many days...(I\'m in process of studying ASP.NET MVC 3)

In this link -- Razor If/Else conditional operator syntax -- is said

相关标签:
1条回答
  • 2021-01-18 06:34
    @(item.Manager == null ? new HtmlString("<i>unassigned</i>") : new HtmlString( item.Manager.Name) )
    
    0 讨论(0)
提交回复
热议问题