2009-03-01 61 views
0

我刚刚从beta版产品更新到RC1 MVC。注册ModelBinders

我在我的Application_Start下面的代码(在global.ascx)

System.Web.Mvc.ModelBinders.Binders[typeof(Shared.DO.Gig)] = new GigModelBinder(); 

这将导致以下异常....

找不到方法:System.Collections中 .Generic.IDictionary`2 System.Web.Mvc.ModelBinders.get_Binders()'。

回答

0

你重建了你的项目吗? Binders是一个ModelBinderDictionary,它不是一个IDictionary,很可能是在RC1之前。

+0

是的 - 我重建。我们现在应该如何注册绑定器? – iasksillyquestions 2009-03-02 09:18:07