Setting a page title I have the following MVC View Syntax
<title> Category : <% Model.CurrentModel ?? "All Models" %></title>
Which writes "Category : All Models" to a page title if Model.CurrentModel
is null.
I've tried开发者_开发技巧 to use the same with Razor View engine, but can't seem to get it right.
@(Model.CurrentModel ?? "All Models")
Try that.
精彩评论