fan711
fan711

Reputation: 716

MVC Editor Template for Decimal and Integer

I've tried to create a simple custom editor template for Decimal and Integer types:

@ModelType Decimal?
@Html.NumericBoxFor(Function(m) m)

and

@ModelType Integer?
@Html.NumericBoxFor(Function(m) m)

Saved them as ~/Views/Shared/EditorTemplates/Decimal.vbhtml and ~/Views/Shared/EditorTemplates/Integer.vbhtml (also tried Int32.vbhtml).

However my custom HtmlHelper function is never getting called. After searching the web and trying many things can't figure out.. What's wrong here?

Upvotes: 3

Views: 1770

Answers (1)

fan711
fan711

Reputation: 716

I just found that in the application was a custom ViewEngine in place which screwed up paths (defined via global.asax). Removing it solves the issue.

Upvotes: 1

Related Questions