samedi 9 mai 2015

MVC Helper @Html.LabelFor not showing up?

Am I missing a reference or something?

I have a reference to System.Web.Mvc 4.0x

But whenever I try this

 @Html.LabelFor(x=>Model.yadda, new {id="_lblYadda"});

I get nothing I can't even get it to compile. I only have a reference to

 @Html.Label("Yadda", "Yadda yadda");

I spent like 5 minutes looking, I know it's simple so.. help please!

WebConfig namespaces are:

 <namespaces>
    <add namespace="System.Web.Helpers" />
    <add namespace="System.Web.Mvc" />
    <add namespace="System.Web.Mvc.Ajax" />
    <add namespace="System.Web.Mvc.Html" />
    <add namespace="System.Web.Optimization" />
    <add namespace="System.Web.Routing" />
    <add namespace="System.Web.WebPages" />
  </namespaces>

Aucun commentaire:

Enregistrer un commentaire