0

I have a Model that has an integer property. Everything works find except when a user enter a comma in the input. eg: 100,000 Is there a way to get rid of commas before model binding?

I know I can use client side javascript but perfer a server side solution

James
  • 2,811
  • 3
  • 25
  • 29
  • Refer [this SO answer](http://stackoverflow.com/questions/21189158/change-default-numberstyles-on-integers) for creating a custom `ModelBinder` to accept thousands separator –  Aug 05 '14 at 02:52

1 Answers1

0

The answer could be to create a custom model binder that modifies the input. See this post.

Community
  • 1
  • 1
Tyler Morrow
  • 949
  • 8
  • 31