Posted By

AndewAllison on 03/09/11


Tagged

syntax aspnet MVC razor


Versions (?)

Null check for razor in line text display


 / Published in: C#
 

This is far from ground breaking but I forget it all the time so thought this might be a useful place to keep a reference of it

  1. @(Model.Roles == null ? "No" : Model.Roles.Count.ToString())

Report this snippet  

You need to login to post a comment.