mercredi 12 octobre 2016

MVC @if statements

Just trying to write simple if statement to check whether a model has a certain string value. Currently I have this

@if (offer.Title === "Offer")
{
    //do something
}

I know I have results where the title does equal "Offer" but nothing is displaying on my webpage. I don't normally write MVC (hence the noobie question) but I figured this would be pretty simple so just went for it myself..




Aucun commentaire:

Enregistrer un commentaire