Ejemplo n.º 1
0
        public static void RegisterBinder(ModelBinderDictionary binders)
        {
            FileCollectionModelBinder binder = new FileCollectionModelBinder();

            binders[typeof(HttpPostedFileBase[])]             = binder;
            binders[typeof(IEnumerable <HttpPostedFileBase>)] = binder;
            binders[typeof(ICollection <HttpPostedFileBase>)] = binder;
            binders[typeof(IList <HttpPostedFileBase>)]       = binder;
            binders[typeof(Collection <HttpPostedFileBase>)]  = binder;
            binders[typeof(List <HttpPostedFileBase>)]        = binder;
        }
Ejemplo n.º 2
0
        public static void RegisterBinder(ModelBinderDictionary binders) {
            FileCollectionModelBinder binder = new FileCollectionModelBinder();

            binders[typeof(HttpPostedFileBase[])] = binder;
            binders[typeof(IEnumerable<HttpPostedFileBase>)] = binder;
            binders[typeof(ICollection<HttpPostedFileBase>)] = binder;
            binders[typeof(IList<HttpPostedFileBase>)] = binder;
            binders[typeof(Collection<HttpPostedFileBase>)] = binder;
            binders[typeof(List<HttpPostedFileBase>)] = binder;
        }