MVC4.0
文章平均质量分 81
小发发吖
这个作者很懒,什么都没留下…
展开
-
mvc和三层的关系
转载 2017-07-24 11:39:26 · 225 阅读 · 0 评论 -
mvc 页面对日期反json
日期显示为该乱码时 则使用引用该脚本下的DateTimeFormatter方法Date.prototype.format = function (format) { var o = { "M+": this.getMonth() + 1, // month "d+": this.getDate(), // day "原创 2017-07-25 16:26:55 · 208 阅读 · 0 评论 -
mvc 上传图片及预览
@model ShoeManage.Model.Order@{ Layout = null;} @using (Html.BeginForm("UpLoad", "ImageUpload", FormMethod.Post, new { enctype = "multipart/form-data", id = "myform" })) { 预览 }原创 2017-07-25 09:54:50 · 901 阅读 · 0 评论 -
MVC数据验证
一、基础特性 一、Required 必填选项,当提交的表单缺少该值就引发验证错误。 二、StringLength 指定允许的长度 指定最大长度: [StringLength(20)] //最大长度不超过20个字符 指定最短于最长限制: [StringLength(20,MinimumLength=3)] //最大长度不转载 2017-07-24 11:15:28 · 353 阅读 · 0 评论 -
导出excel
一· 通过构造table表格导出Excel //1、获取数据源(List变量) //List list = new List() { // new Person(){ID=1,Name="张三",Age=20,Sex="男"}, // new Person(){ID=2,Name="李四原创 2017-08-01 11:17:35 · 171 阅读 · 0 评论 -
MVC 导入excel
/// /// 导入excel /// /// public ActionResult Import() { HttpPostedFileBase file = Request.Files["excel"]; //1、先保存上传的excel文件(这一步与上传图片流程原创 2017-08-01 11:33:03 · 430 阅读 · 0 评论