会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
秋明小司机丶
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
下一页
2017年6月29日
“System.Data.Entity.ModelConfiguration.ModelValidationException”类型的未经处理的异常在 EntityFramework.dll 中发生
摘要: 下面是错误位置。
阅读全文
posted @ 2017-06-29 18:10 段十八丶
阅读(1995)
评论(0)
推荐(0)
2017年6月26日
js中的this使用
摘要: 上面代码调用this方法的代码是 function onset(obj) { alert(obj); //[object HTMLInputElement] alert($(obj).attr("href")); //# alert($(obj).parent().attr("id")) // ZZ
阅读全文
posted @ 2017-06-26 11:07 段十八丶
阅读(139)
评论(0)
推荐(0)
2017年6月25日
MVC身份认证 解决办法 测试可行
摘要: 这个方法还有点不太完善,个人觉得或许可能有更好的办法。 但是现在还不知道,看到这种留个记录。 首先在项目根目录创建文件夹Filter 然后创建BasicAuthAttribute.cs 类文件 代码如下: 继承于ActionFilterAttribute,而后调用的时候在项目的控制器以特性的方式来使
阅读全文
posted @ 2017-06-25 23:00 段十八丶
阅读(177)
评论(0)
推荐(0)
2017年6月13日
Asp.NET获取客户端地址方法
摘要: string IP = HttpContext.Request != null ? HttpContext.Request.UserHostAddress : "127.0.0.1"; 注:这玩意你在VS上运行LocalHost 不好用,返回的一定是 "::1" 但是放到IIS上应该就好使多了。
阅读全文
posted @ 2017-06-13 16:59 段十八丶
阅读(243)
评论(0)
推荐(0)
EF返回DataTable并且返回Json数据
摘要: public ActionResult GetData() { string data = Request.Form["Data"] ?? ""; using (var db = new BaseContext()) { SqlConnection conn = new System.Data.SqlClient.SqlConnection(); //conn.ConnectionString ...
阅读全文
posted @ 2017-06-13 10:35 段十八丶
阅读(3500)
评论(0)
推荐(0)
2017年6月8日
EF软删和删除 运用泛型
摘要: 1 Person p = new Person(); 2 p.Id = 1; 3 p.Name = "张三"; 4 p.Sex = "男"; 5 p.Weight = 65; 6 p.Height = 180; 7 p.Birthday = DateTime.Now; 8 9 List<Person
阅读全文
posted @ 2017-06-08 14:25 段十八丶
阅读(328)
评论(0)
推荐(0)
2017年6月7日
VBA在32位下没问题,到64位异常报错
摘要: 64 位 Visual Basic for Applications 概述Microsoft Visual Basic for Applications (VBA) 是 Microsoft Office 附带的 Visual Basic 版本。在 Microsoft Office 2010 中,VB
阅读全文
posted @ 2017-06-07 18:59 段十八丶
阅读(9109)
评论(0)
推荐(0)
2017年6月6日
Unicode String 相互转换 C#
摘要: public string StringToUnicode(string str) { string outStr = ""; if (!string.IsNullOrEmpty(str)) { for (int i = 0; i < str.Length; i++) ...
阅读全文
posted @ 2017-06-06 15:46 段十八丶
阅读(3853)
评论(0)
推荐(0)
2017年6月5日
ObjectStateManager 中已存在具有同一键的对象。ObjectStateManager 无法跟踪具有相同键的多个对象
摘要: 折腾了我六个小时,感觉自己智商下降的不行。 一个哥们给我提了提说 EF 一定是先查后改,然后SaveChanges(); 我是在登陆成功后修改密码操纵中,第一次修改没问题,第二次就会出现这种情况。 翻来覆去想不出 为什么。 public ActionResult EditPwd() { BaseUs
阅读全文
posted @ 2017-06-05 14:02 段十八丶
阅读(316)
评论(0)
推荐(0)
2017年5月31日
form表单提交
摘要: 个人用的比较多的表单提交方法
阅读全文
posted @ 2017-05-31 23:55 段十八丶
阅读(203)
评论(0)
推荐(0)
上一页
1
2
3
4
下一页
公告