随笔分类 -  asp.net

摘要:Expression> expression = t => true; expression = expression.And(t => t.AAA == 1); expression = expression.And(t => t.BBB > 1); var ds = products.AsQueryable().Where(expression).ToList(); 阅读全文
posted @ 2017-07-11 14:05 大长腿的猪 阅读(1202) 评论(0) 推荐(0)
摘要:public partial class BaseDalwhere T :class { //DbContext context = new HMOAContainer(); DbContext context = ContextFactory.GetContext(); //增加 public int Add(T userInfo) ... 阅读全文
posted @ 2016-09-16 21:32 大长腿的猪 阅读(575) 评论(2) 推荐(0)
摘要:访问失败, 解决方案,URL要正确 阅读全文
posted @ 2016-06-07 17:41 大长腿的猪 阅读(203) 评论(0) 推荐(0)
摘要:Repeater 不能和GridView 一样可以直接操作行 但是有和GridView一样的FindControl查找控件方法 解决方案: 想要获取的值用 Label控件代替 后台实现方法: for (int i = 0; i < data1.Items.Count; i++) { CheckBox cbx = data1.Items[i]... 阅读全文
posted @ 2016-05-19 22:12 大长腿的猪 阅读(471) 评论(0) 推荐(0)
摘要:错误写法: 解决方法: 原理:点击一次就会POS请求一次,说以当点击时就先改变了值。 阅读全文
posted @ 2016-05-19 18:12 大长腿的猪 阅读(353) 评论(0) 推荐(0)
摘要:问题:GridView1.DataKeys[e.RowIndex].Value.ToString() 必须为非负值并小于集合大小。 异常信息:System.Web.HttpUnhandledException: 引发类型为 “System.Web.HttpUnhandledException”的异常。---> System.ArgumentOutOfRangeException: 索引超出范围... 阅读全文
posted @ 2016-05-17 22:19 大长腿的猪 阅读(2213) 评论(0) 推荐(0)