For binding to a List you don't need a custom model binder, simply use the syntax in your razor view:
@for (int i = 0; i < Model.SomeCollectionProperty.Count; ++i)
{
@Html.TextBoxFor(m => m.SomeCollectionProperty[i])
}
That said, if you do need to create a custom model binder for a more complex scenario, you simply need to implement an IModelBinder or override e.g. the BindProperty method of the DefaultModelBinder and register it with the MVC framework.
In the first case, you register your custom binder in the Application_Start of your global.asax like so:
ModelBinders.Binders.Add(typeof(MyFancyType), new MyFancyTypeModelBinder());
In the second case, you replace the default model binder like so:
ModelBinders.Binders.DefaultBinder = new MyExtendedDefaultModelBinder();
In both of these cases, your model binder classes need to be thread-safe, since the same model binder instance will be used for all http requests.
As a third option, you can actually take full control of model binder construction by implementing an IModelBinderProvider and registering it like so:
ModelBinderProviders.BinderProviders.Add(new MyModelBinderProvider());
The final option that I am aware of is to use the ModelBinderAttribute, like so
[ModelBinder(typeof(MyCustomModelBinder))]
public class MyModelClass
{
public class MyCustomModelBinder : DefaultModelBinder
{
...
}
...
}
In the above example, the model binder is actually nested inside the model class, but it can be defined separately as well.
I tend to prefer to implement IModelBinder and register it in the model binders dictionary - as that allows me easily to reuse the same type across multiple models with one simple registration. In the rare event that I need to completely customize model binding for a particular model, I will use the last approach.