In my project, I have a partial view with the following code block that fulfills the following conditions:
@if (!string.IsNullOrEmpty(Model.FirstName)) {
<h3> @Model.FirtsName </h3>
}
Just as easy. When I run my project, the null model returns. I get the following error:
Cannot perform runtime binding on a null reference
I thought I already defined this in the instructions if
.
Is there something I am missing?
source
share