1

When I user this targ on a page like:

@Html.TextBoxFor(model => model.JobName, new { @class = "form-control" })

It can work, But when I use like this:

@Html.TextBoxFor(model => model.JobName, new { @data-provide="typeahead", })

then it can't work, because this attribute: data-provide, it have a symbol which is '-', how I can solve this problem?

Kevin
  • 11
  • 1

1 Answers1

3

You need to use the underscore character (the helper will translate this correctly and generate data-provide="typeahead")

@Html.TextBoxFor(model => model.JobName, new { data_provide="typeahead", })