I want to be able to show data if an integer is not null. However, if is null I get error
@if (item.PTWSubsequent.PTWNoS != 0)
{
}
and code behind
PTWContentList = await _context.PTWContents.Include(s => s.PTWMain).Include(s => s.PTWSubsequent).Where(s => s.PTWMain.OrgID == orgid).ToListAsync();
I get the error that PTWNoS is null which I know is null. I just want to not show the div if is null

Sachin SinghPosted Sep 2, 2021, 7:05 PM
Sachin SinghPosted Sep 2, 2021, 7:11 PM
Marius VasilePosted Sep 2, 2021, 7:07 PM
Marius VasilePosted Sep 2, 2021, 6:56 PM
Sachin SinghPosted Sep 2, 2021, 6:53 PM