Nullable Date Fields in Razor

    @if(Model.ExpirationDate.HasValue) {
              Model.ExpirationDate.Value.ToShortDateString();
       
            }

Comments

Popular posts from this blog

Return View of a model or an HttpStatusCode

Meta Data - Annotating Models

LINQ - Left join with where conditions