摘要: 会出现如下错误”找到多个与名为“home”的控制器匹配的类型“在RouteConfig文件中添加命名空间可解决routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defau... 阅读全文
posted @ 2015-03-09 17:18 李子深 阅读(830) 评论(1) 推荐(0) 编辑
摘要: 占位符{0}对应属性{1}对应minimum{2}对应maximum[StringLength(15, MinimumLength = 6, ErrorMessage = "密码长度必须在{2}和{1}之间")]先创建一个资源文件为了实现这种验证效果资源文件里可以这样写然后新建一个类,这个类主要实现... 阅读全文
posted @ 2015-02-10 14:12 李子深 阅读(1593) 评论(0) 推荐(0) 编辑
摘要: 1.连接字符串一般项目在本地开发可能会用到windows验证,但是服务器上却使用sql server身份验证,可能会出现如下错误。用户 'NT AUTHORITY\NETWORK SERVICE' 登录失败再看看web.config配置的连接字符串注意蓝色标注,它说明是windows验证,所以要sq... 阅读全文
posted @ 2015-02-10 13:56 李子深 阅读(1419) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Drawing;using System.Drawing.Drawing2D;using System.Drawing.Imaging;using System.IO;using S... 阅读全文
posted @ 2015-02-09 16:57 李子深 阅读(626) 评论(0) 推荐(0) 编辑
摘要: 先引用两个命名空间using System.Security.Cryptography;using System.Text;以下是md5加密方法/// /// md5加密--32位 /// /// /// public s... 阅读全文
posted @ 2015-02-09 16:48 李子深 阅读(542) 评论(0) 推荐(0) 编辑
摘要: 有时候一个全局的值可以设置到appSettings里,通过下面代码调用string deptid = ConfigurationManager.AppSettings["DepartmentRootID"]; 不过建议写在connectionStrings里 http://www... 阅读全文
posted @ 2015-01-28 21:29 李子深 阅读(484) 评论(0) 推荐(0) 编辑
摘要: 1.not in方法select top 10 from books where id not in(select top 30 id from books)2.row_number()函数select * from (select *,row_number() over (order by id)... 阅读全文
posted @ 2015-01-27 08:10 李子深 阅读(1335) 评论(1) 推荐(0) 编辑
摘要: default.aspx 代码如下: default.aspx.cs 代码如下:using System;using System.Collectio... 阅读全文
posted @ 2015-01-24 22:53 李子深 阅读(4187) 评论(2) 推荐(0) 编辑
摘要: 前台文件 用户名 用户名不能为空 密 码 两次密码不一样 ... 阅读全文
posted @ 2015-01-18 11:19 李子深 阅读(676) 评论(0) 推荐(0) 编辑
摘要: 对于数据的批量增删改最慢的就是操作一条就提交一次事务。以下是对增删改操作的优化测试同样的300条数据 批量新增只提交一次事务 用时:10673.5444ms 批量新增只提交一次事务并把context.Configuration.... 阅读全文
posted @ 2014-12-27 00:50 李子深 阅读(1212) 评论(2) 推荐(0) 编辑
李子深的博客

真诚赞赏,手留余香

使用微信扫描二维码完成支付