Knockout and MVC 2.0

为君一笑 提交于 2019-12-23 07:52:19

问题


Does anyone know of an example application using knockout js and MVC 2? I'm trying to learn knockout and am having trouble grasping how to persist model data via an ajax call to an action.


回答1:


There's a great post here by the author of Knockout on how to use it with MVC. In MVC 2 you can use the built in model binder instead of a [FromJson] attribute like the article suggests.

Congrats on finding Knockout. My team has absolutely loved working with it. One of our guys replaced a dynamic silverlight grid control that took weeks of development with a knockout form (w/ even more functionality!) in less than a day. It's a great framework for dealing with lists on the client side.




回答2:


I have ported the knockout samples to .NET MVC3 (Razor)-- with restful data access. The url is http://harshbhasin.com/opensource/ko



来源:https://stackoverflow.com/questions/4415056/knockout-and-mvc-2-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!