I have a model binder in Global.asax:
ModelBinders.Binders.Add(typeof(string), new StringModelBinder());
And I have a model in which I want to ignore the binder for one of string properties:
public class MyModel
{
...
public string StringProp { get; set; }
...
}
For instance StringModelBinder trims my string. But I don't want to trim StringProp. How can I ignore the binder in such case?
EDITED: I am not looking for a solution to trim a string. I'm looking for a solution to ignore trimming for some string.