0

I am working on a simple situation where Im trying to have three different span based on the results in a field in my index field. So I have the following code

    @if (item.REF_Status.Result == "A")
    {


        <span class="label label-sm label-success"> Passed</span>

    }
</td>

However this eves me the error "Object reference not set to an instance of an object." However, I changed the if condition to @if(1==1) and the result was as i expected with every row getting the "passed" span. So the error seems to be with comparing the condition.

Any help will be appreciated.

Uwe Keim
  • 36,867
  • 50
  • 163
  • 268
Unknown Code
  • 37
  • 2
  • 10

0 Answers0