Users Pricing

forum

Home Forums In Razor view, how to check model property is null? – MindStick

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

Simond Gear 1931 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.


2 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md