I am using the label helper in a web app:
@Html.Label("MyLabel", "MyLabelForAttribute")
according to the intellisense im using this function:
Public Function Label(labelText As String, labelFor As String) As System.Web.IHtmlString
Member of System.Web.WebPages.Html.HtmlHelper
So the first value is the label's text and the second is the label's for attribute, so it should render this html:
<label for="MyLabelForAttribute">MyLabel</label>
However it is rending this html:
<label for="MyLabel">MyLabelForAttribute</label>
It is inverting the values.
I suspect the problem is that the web app (somehow) is using this function:
Public Shared Function Label(html As System.Web.Mvc.HtmlHelper, expression As String, labelText As String) As System.Web.Mvc.MvcHtmlString
Member of System.Web.Mvc.Html.LabelExtensions
Is there a way to force the app to use this assembly System.Web.WebPages.Html.HtmlHelper?
It is actually using the wrong assembly, is there a way to force the app to use System.Web.WebPages.Html.HtmlHelper or fix the intellisense to show the used assembly (System.Web.Mvc.Html.LabelExtensions) ?