随笔分类 - Asp.Net MVC
摘要:Brad Wilson在他自己的博客写了有关ASP.NET MVC3依赖注入支持的一系列文章,但由于某些原因(你懂的),需要FQ才能阅读。为了方便自己也方便喜欢的同学,特意FQ再拷贝回来发布,以下是这一系列文章的索引:Part 1: IntroductionPart 2: ControllersPart 3: View Engines/View PagesPart 4: FiltersPart 5: IDependencyResolverPart 6: Model ValidationPart 7: Model MetadataPart 8: Value ProvidersPart 9: Mo
阅读全文
摘要:View Page ActivatorIn ASP.NET MVC, it’s common for views to be compiled into classes. In MVC 1.0, we shipped theWebFormViewEngineas the default view engine, which allowed the user to write views using the familiar % % syntax from ASP.NET WebForms. The first time the view is rendered, the view file
阅读全文
摘要:Controller ActivatorIn MVC 1.0, we introducedIControllerFactoryto allow better dependency injection of controller instances. We also provided theDefaultControllerFactory, which created controller instances with Activator.CreateInstance. Some of this is discussed inPart 2of this series.We realized th
阅读全文
摘要:Value ProvidersASP.NET MVC 2 introduced a new method to find value providers: theValueProviderFactoryclass. Value providers are used by the model binding system in MVC to populate the values of model objects. MVC includes value providers for several common value sources (including query string, form
阅读全文
摘要:Model BindersASP.NET MVC 1.0 introduced theIModelBinderinterface. Developers who implement this interface are responsible for creating models from values obtained from value providers. In ASP.NET MVC 3, we introduced a new interface (IModelBinderProvider) which allows developers to dynamically provi
阅读全文
摘要:Model MetadataASP.NET MVC 2 introduced an extensible model metadata system where developers could implement a class which derived fromModelMetadataProviderto provide meta-information about the models in the system. In ASP.NET MVC 3, we have made the metadata provider findable via the dependency reso
阅读全文
摘要:Model ValidatorsASP.NET MVC 2 introduced an extensible model validation system where developers could implement a class which derived fromModelValidatorProviderto influence the validation process on both the client-side and server-side. In ASP.NET MVC 3, we have made these validator providers findab
阅读全文
摘要:What's New Since Preview 1?We shippedASP.NET MVC 3 Betatoday, and with it we’ve made some significant progress (and departures) from the MVC 3 Preview 1 build released in July as it pertains to service location.We received significant feedback during the Preview 1 time frame about our use proposed u
阅读全文
摘要:Important UpdateWe've made significant changes to the IoC support in ASP.NET MVC 3 Beta. Please readPart 5for more information.Filters and Filter ProvidersWe introduced the concept of filters in ASP.NET MVC 1.0. A filter can implement one of more of the following interfaces:IActionFilter,IResultFilt
阅读全文
摘要:Important UpdateWe've made significant changes to the IoC support in ASP.NET MVC 3 Beta. Please readPart 5for more information.View Engine Registration and View Page CreationASP.NET MVC 1.0 introduced View Engines (implementingIViewEngineandIView), shipping with the single WebForms-based view engine
阅读全文
摘要:Important UpdateWe've made significant changes to the IoC support in ASP.NET MVC 3 Beta. Please readPart 5for more information.Controller CreationThe most common form of service location today in ASP.NET MVC is for controller creation. In MVC 1.0, we created an interface namedIControllerFactorywhich
阅读全文
摘要:Important UpdateWe've made significant changes to the IoC support in ASP.NET MVC 3 Beta. Please readPart 5for more information.IntroductionOne of the new features in ASP.NET MVC 3 is the ability to register a service locator that will be used by the framework. Prior versions of the MVC framework hav
阅读全文
摘要:上个礼拜,我的Azure邀请码终于到了,小兴奋了一把,于是马上去注册账号,并成功部署了一个网站到Azure上。由于最近在学习Asp.Net Mvc框架,于是就想部署一个Mvc应用到Azure上,本来理所当然的认为Azure会支持Mvc,结果实际部署之后发现并不支持。后来经过几次都不成功之后,有点想放弃了,不过幸好后来看到了以下这篇文章:http://blogs.msdn.com/jnak/arch...
阅读全文
摘要:在使用Asp.net Mvc MVCContrib中的Castle有时会出现No component for key HomeController was found这样的错误 在看了园子里的《Asp.net Mvc中MVCContrib中无法使用Castle的发解决方案 》这篇文章之后,按文章的方法修改了代码,修改方法如下: 下载MvcContr...
阅读全文