摘要:
下面是错误位置。 阅读全文
摘要:
上面代码调用this方法的代码是 function onset(obj) { alert(obj); //[object HTMLInputElement] alert($(obj).attr("href")); //# alert($(obj).parent().attr("id")) // ZZ 阅读全文
摘要:
这个方法还有点不太完善,个人觉得或许可能有更好的办法。 但是现在还不知道,看到这种留个记录。 首先在项目根目录创建文件夹Filter 然后创建BasicAuthAttribute.cs 类文件 代码如下: 继承于ActionFilterAttribute,而后调用的时候在项目的控制器以特性的方式来使 阅读全文
摘要:
string IP = HttpContext.Request != null ? HttpContext.Request.UserHostAddress : "127.0.0.1"; 注:这玩意你在VS上运行LocalHost 不好用,返回的一定是 "::1" 但是放到IIS上应该就好使多了。 阅读全文
摘要:
public ActionResult GetData() { string data = Request.Form["Data"] ?? ""; using (var db = new BaseContext()) { SqlConnection conn = new System.Data.SqlClient.SqlConnection(); //conn.ConnectionString ... 阅读全文
摘要:
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 阅读全文
摘要:
64 位 Visual Basic for Applications 概述Microsoft Visual Basic for Applications (VBA) 是 Microsoft Office 附带的 Visual Basic 版本。在 Microsoft Office 2010 中,VB 阅读全文
摘要:
public string StringToUnicode(string str) { string outStr = ""; if (!string.IsNullOrEmpty(str)) { for (int i = 0; i < str.Length; i++) ... 阅读全文
摘要:
折腾了我六个小时,感觉自己智商下降的不行。 一个哥们给我提了提说 EF 一定是先查后改,然后SaveChanges(); 我是在登陆成功后修改密码操纵中,第一次修改没问题,第二次就会出现这种情况。 翻来覆去想不出 为什么。 public ActionResult EditPwd() { BaseUs 阅读全文