摘要: 1.上传图片前台:form中加入 enctype="multipart/form-data"。一般处理事件中 context.Request.ContentType = "text/html";案例: HttpFileCollection files = HttpContext.Current.Request.Files; if (files.Count > 0) { for (int i = 0; i < files.Count; i++) { Htt... 阅读全文
posted @ 2012-07-17 10:46 slc 阅读(212) 评论(0) 推荐(0) 编辑
摘要: Excel1.导出excel出现数字过长导致科学计数法出现E字:解决方案:使用vnd.ms-excel.numberformat:@将数字转换为文本 案例: protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { int count = GridView1.Columns.Count; for (int i ... 阅读全文
posted @ 2012-07-17 10:09 slc 阅读(222) 评论(0) 推荐(0) 编辑