摘要: 上传文件部分代码: /// /// 上传保存文件并返回文件的保存地址和文件名称 /// /// 上传文件名称 /// private string FileUP( string fileName) { string filePath = string.Empty; if (fupDocument.HasFile) { //判断文件是否小于1Mb if (fupDoc... 阅读全文
posted @ 2013-10-27 15:03 .Justme 阅读(463) 评论(0) 推荐(0) 编辑
摘要: /// /// 绑定父项分类 /// protected void DDLBindClass() { DataSet ds = new BLL_Cpgl_cpfl().GetAllList(); DataTable dt = ds.Tables[0]; DataRow[] dr = dt.Select("Parentid=0"); for (int i = 0; i /// 绑定子分类信息 /// /// 数据表 /// 父分类ID /// 分级... 阅读全文
posted @ 2013-10-17 09:32 .Justme 阅读(506) 评论(0) 推荐(0) 编辑
摘要: 最近在做的项目发布后出现了乱码的问题,既然出现了乱码很大的可能性是跟编码有关系,所以首先的解决方案就是重新对cookie进行编码,在写入的cookie的时候编码,在读取的时候解码在写入cookie的时候重新设置编码方式:HttpCookie cookname= new HttpCookie("name"); cookname.Value = HttpUtility.UrlEncode(textbox1.Value.ToString(), System.Text.Encoding.GetEncoding("GB2312"));Response.Append 阅读全文
posted @ 2013-09-20 09:07 .Justme 阅读(180) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Web;/// ///CookiesSel 的摘要说明/// public class CookiesSel{ public CookiesSel() { // //TODO: 在此处添加构造函数逻辑 // } private static HttpResponse respone = HttpContext.Current.Response; private stati... 阅读全文
posted @ 2013-09-14 13:59 .Justme 阅读(441) 评论(0) 推荐(0) 编辑