How can I, for example, create a data-bind
attribute when I declare and Html.TextboxFor
helper?
Doing simply:
@Html.TextBoxFor(model => model.SomeProperty, new { data-bind="something" })
is not legitimate because of the naming issue with a dash "-" symbol. Is there a way around this issue or is it just not possible to pass html attributes with names containing dashes?
NOTE: I tried slapping the @
(this helps if you want to pass an atrribute that matches C# reserved words like "class") in front of the attribute but that didn't do the trick...