Adding a controller to a ASP.NET Core MVC app with Visual Studio 在asp.net core mvc 中添加一个控制器 2017-2-28 5 分钟阅读时长 By Rick Anderson The Model-View-Controller (MVC) architectural pattern separates an app into three main components: Model, View, and Contro…
Adding a view to an ASP.NET Core MVC app 在asp.net core mvc中添加视图 2017-3-4 7 分钟阅读时长 本文内容 1.Changing views and layout pages 修改视图和布局页 2.Change the title and menu link in the layout file 在布局文件中修改标题与菜单 3.Passing Data from the Controller to the View 从控制器向视图…
Adding a model to an ASP.NET Core MVC app在 asp.net core mvc 中添加一个model (模型)2017-3-30 8 分钟阅读时长 本文内容1. Add a data model class添加一个数据模型类2. Scaffolding a controller控制器基架3. Add EF tooling and perform initial migration添加EF工具并做基本迁移4. Test the app测试应用5. Depen…
在前面的几篇文章中,已经在控制台和界面实现了属性值的笛卡尔乘积,这是商品模块中的一个难点.本篇就来实现在ASP.NET MVC4下商品模块的一个小样.与本篇相关的文章包括: 1.ASP.NET MVC中实现属性和属性值的组合,即笛卡尔乘积01, 在控制台实现  2.ASP.NET MVC中实现属性和属性值的组合,即笛卡尔乘积02, 在界面实现   3.再议ASP.NET MVC中CheckBoxList的验证   4.ASP.NET MVC在服务端把异步上传的图片裁剪成不同尺寸分别保存,并设置上…
在大型的ASP.NET mvc5项目中一般都有许多个功能模块,这些功能模块可以用Area(中文翻译为区域)把它们分离开来,比如:Admin,Customer,Bill.ASP.NET MVC项目中把各个功能分为不同Area的之后每一个Area都有独立的Controller,View文件结构.这样可以把这些功能分给不同的开发者同时开发而彼此之间不会冲突,这样的文件结构各司其职,直观明了,易于维护和管理.下面我们看看怎么在ASP.NET MVC5中创建一个Area和Area直接之间链接的处理. 一.…
一.下载Thymeleaf 官方下载地址:https://dl.bintray.com/thymeleaf/downloads/thymeleaf/ 我下载的是最新的3.0.11版本 把包里的jar包丢到项目中去: dist/thymeleaf-3.0.11.RELEASE.jar dist/thymeleaf-spring5-3.0.11.RELEASE.jar lib/attoparser-2.0.5.RELEASE.jar lib/slf4j-api-1.7.25.jar lib/unbe…
1. 开启 FTP 和 IIS 服务功能:   2. 添加新用户: 打开计算机管理界面:   展开“本地用户与组”:   邮件点击“用户”->点击“创建新用户”:   在创建新用户对话框输入用户名和密码,并设置密码更新策略:   为了避免麻烦,我直接设置了“用户不能改密码”和“用户密码永远不过期”. 3. 配置新用户: 在用户组里面右键新建用户,打开属性对话框:     删除Users,并且添加Guests Group:   设置完以后是这样的:   其实这个Guests组原本也是不安全的,但致…
1.新建一个类 (以下实现了打印日志功能) using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace MvcReporistory.Controllers { public class LoggerFilter : FilterAttribute, IActionFilter { void IActionFilter.On…
1,为当前已有的表添加新的字段 alter table student add studentName varchar(20) not null; 2,为当前已有的表中的字段设置为主键自增 alter table student add constraint PK_studentId primaryKey(studentId); 3,为当前已有的表中的字段设置为外键 alter table student add constraint FK_teacherId_studentInfo forei…