ASP.NET MVC 相关资源

本文探讨了ASP.NET MVC框架的应用技巧,包括如何使用Model进行数据操作、实现角色授权,以及如何在视图中动态添加控件并获取其值等。此外,还深入介绍了Knockout.js在ASP.NET MVC项目中的集成方法,如双向数据绑定、视图模型的创建及维护等。

相关资源

开发要点(不一定正确)

  1. 定义了 Model,如果不添加数据,一般不会生成该表,所以,可以定义若干 Model,方便数据的操作。
  2. 若在某表中定义了 Navigation Properties,则可以往这样的属性中添加对象,即向被定义为 Navigation Properties 的表中添加了记录。

Identity

  1. ASP.NET Identity 2.0: Customizing Users and Roles
  2. ASP.NET MVC 5 Identity: Extending and Modifying Roles
  3. ASP.NET MVC 5: Extending ASP.NET Identity 2.0 Roles and Implementation of Role Based Authorization
  4. Extending Identity Accounts and Implementing Role-Based Authentication in ASP.NET MVC 5
  5. MVC and Identity Framework 2.0
  6. Embedded Application Identity Part 1: Basic Identity Management in ASP.NET MVC 5
  7. Embedded Application Identity Part 2: Role-Based Authorization in ASP.NET MVC 5
  8. ASP.NET Web Api and Identity 2.0 - Customizing Identity Models and Implementing Role-Based Authorization
  9. Displaying User Full Name instead of User Email in AspNet Identity 2.0

Multiple Models

  1. Multiple Models in a View in ASP.NET MVC 4 / MVC 5
  2. How to Choose the Best Way to Pass Multiple Models in ASP.NET MVC
  3. List Model Binding in MVC

MVC动态添加文本框,后台应用FormCollection接管
ASP.NET给Table动态添加控件并且得到控件的值
Getting Data From View to Controller in MVC

Introducing Dynamic Bundles for ASP.NET MVC
Dynamic DropDownList Binding in ASP.NET MVC With Database
ASP.NET MVC Chart Control
Dynamic Generation of Tabs to Host IFrames using jQuery and Json in ASP.NET MVC
Components, Aspects, and Dynamic Decorator for an MVC/AJAX/REST Application
Generate Dynamic Autocomplete Feature to a Textbox using JQuery in MVC
ASP.NET MVC Editable Table (jQuery DataTables and ASP.NET MVC integration - Part II)

Knockout js

  1. Knockout MVC
    其中的示例:Model 代码在 Models 文件夹中创建相应的类文件,Razor 代码在相应的 Views 文件夹中创建相应的视图文件,Controller 代码在 Controller 文件夹中创建相应的 Controller 文件。
    其中,在项目文件中需要先添加 KMVC,即 TOOLS NuGet Package Manager Manage NuGet Packages for Solution 中搜索“KMVC”,或者,在 TOOLS NuGet Package Manager Package Manager Console 中输入
PM> Install-Package KMVC

并且,在 View 文件的前面或者在 _Layout.cshtml 的 head 区中添加

<!-- Use your version of jQuery -->
<script src="@Url.Content("~/Scripts/jquery-x.y.z.min.js")" type="text/javascript"></script>
<!-- Use your version of knockout -->
<script src="@Url.Content("~/Scripts/knockout-x.y.z.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/knockout.mapping-latest.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/perpetuum.knockout.js")" type="text/javascript"></script>

以上可参见 Quick start
2. Knockout.js and Bootstrap with ASP.NET MVC: Step by Step (Part 1)
3. Knockout.js and Bootstrap with ASP.NET MVC: Step by Step (Part 2)
4. Bootstrap 3 with ASP.NET MVC 5 – Step by Step
5. KnockoutJS nested arrays in MVC
6. The “foreach” binding
7. ASP.NET MVC 4 with Knockout Js
Two sections of step-by-step implementations of KO: Basic Steps and Advanced Steps.
8. Knockout js for Beginners
The Style of MVVM
9. Hello world, with Knockout JS and ASP.NET MVC 4!
VS 2010
10. Getting Started With Knockout.js
A very simple example, there is only a html page.

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值