forum

home / developersection / forums / in razor view, how to check model property is null?

In Razor view, how to check model property is null?

Simond Gear 1717 10-Jul-2017

In Razor view, how to check model property is null?

       @if
(Model.ImageName != null)
            {
            }
            else
            {
            }

 I am writing this code but it is not working.  Please help me.


.net .net  mvc 
Updated on 03-Jul-2023
Can you answer this question?

Answer

2 Answers

Liked By