Checking if the value of type DateTime is null in view and showing blank if null

后端 未结 4 844
隐瞒了意图╮
隐瞒了意图╮ 2020-12-20 23:46

From my controller I have passed value module to view

    public ActionResult Details(long id, string owner)
    {
        var module = _ownedModuleRepositor         


        
4条回答
  •  执笔经年
    2020-12-21 00:10

    Try adding a space:

    Ownership End Date
    @if (Model.End != null) { @Model.End } else { @:  }

提交回复
热议问题