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 1510 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