随笔分类 -  ASP.NET MVC

ASP.NET MVC
摘要:DataTable,集合 转 Json 阅读全文
posted @ 2016-01-01 17:26 小站记忆 阅读(522) 评论(0) 推荐(0)
摘要:1-在 aspx和aspx.cs中,都是以Session["xxx"]="aaa"和aaa=Session["xxx"].ToString()进行读写。 而在ashx中,Session都要使用context.Session,读写方法是这样的: context.Session["xxx"]="aa... 阅读全文
posted @ 2015-11-20 19:56 小站记忆 阅读(3350) 评论(0) 推荐(0)
摘要:一 web.config 配置:1). 2).注意:when set to"debug=true" mode, the runtime will ignore the timeout setting.二.详细代码:http:/... 阅读全文
posted @ 2015-11-16 10:58 小站记忆 阅读(166) 评论(0) 推荐(0)
摘要:Controllers: public ActionResult Index() { return View(db.GuestBooks.ToList()); } // // GET: /Guest2/ ... 阅读全文
posted @ 2015-03-09 16:45 小站记忆 阅读(2122) 评论(0) 推荐(0)
摘要:一、Ueditor插件下载自:http://ueditor.baidu.com/website/二、将解压文件目录ueditor复制到项目根目录后, 修改以下几个文件配置: 1.访问路径配置:ueditor.config.js //为编辑器实例添加一个路径,这个不能被注释 ... 阅读全文
posted @ 2015-03-09 15:38 小站记忆 阅读(2176) 评论(0) 推荐(0)
摘要:1.首先创建一控制器文件UpFileController.cs:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;namespace Mvc4St... 阅读全文
posted @ 2014-10-14 17:48 小站记忆 阅读(523) 评论(0) 推荐(0)
摘要:一.命令开启1.打开控制台:视图->其他窗口->程序包管理器控制台;2.启动数据库迁移,执行命令:enable-migrations 创建成功后会新增migrations目录等。 若报如下错误: PM> Enable-Migrations More than one context ... 阅读全文
posted @ 2014-09-16 17:25 小站记忆 阅读(1389) 评论(0) 推荐(0)
摘要:在EF5.0添加实体数据到数据库的时候,出现“对一个或多个实体的验证失败。有关详细信息,请参见“EntityValidationErrors”属性这个错误解决:SaveChanges前先关闭验证实体有效性(ValidateOnSaveEnabled)这个开关db.Configuration.Vali... 阅读全文
posted @ 2014-06-27 17:12 小站记忆 阅读(2074) 评论(0) 推荐(0)
摘要:ASP.NET MVC 4 中添加的一数据模型[DatabaseGenerated(System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption.Computed)] public DateTime? Crea... 阅读全文
posted @ 2014-05-06 18:08 小站记忆 阅读(777) 评论(0) 推荐(0)