I have a call to a get action method with a list of query string parameters being passed to that method. A few of those parameters have a pipe ‘|’ in them. The problem is that I cannot have action method parameters with pipe characters in them. How do I map a piped querystring parameter to a non-piped C# parameter? Or is there some other trick that I don’t know about?
Share
You could write a custom model binder. For example let’s suppose that you have the following request:
and you would like to bind this request to the following action:
All you have to do is write a custom model binder:
and then: