有关IList 、List 使用Contains的问题

摘要: 引用类型想使用Contains,则必须Override 类的Equals方法以及GetHashCode public override bool Equals(object obj) { if (obj == null) return false; if (!obj.GetType().Equals(this.GetType())) return false; sas_user user = (sas_user)obj; return this.userid.Equals(user.userid); } public override int GetHashCode() { return th 阅读全文
posted @ 2013-11-22 14:49 井绳竖不起来 阅读(142) 评论(0) 推荐(0) 编辑

解决C#导出execl数字过长导致科学计数法显示的问题!

摘要: 可以在RowDataBound中添加e.Row.Cells[1].Attributes.Add("style", "vnd.ms-excel.numberformat:@"); 阅读全文
posted @ 2013-11-14 15:56 井绳竖不起来 阅读(338) 评论(0) 推荐(0) 编辑

解决C#导出execl中文乱码问题!

摘要: 解决办法: Response.Clear(); Response.Buffer = true; HttpContext.Current.Response.Charset = "UTF-8"; HttpContext.Current.Response.ContentEncoding = Encoding.UTF8; HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"; HttpContext.Current.Response.AppendHeader("Con 阅读全文
posted @ 2013-11-14 15:49 井绳竖不起来 阅读(817) 评论(0) 推荐(0) 编辑