摘要: 首先xmlHttpRequest 使用Post时,需要对数据进行编码,在客户端一般使用js中的encodeURIComponent在web.config中指定了gb2312编码后,在aspx页面中如果直接使用 Request[xxx]那么结果将会出现乱码,原因是asp.net系统使用gb2312编码对上传的数据进行解码还原,而encodeURIComponent编码是按uft-8来的.为了避免这个...
阅读全文
摘要: 时间区间计算 //当前时间的月初 //DateTime t_now = new DateTime(2008, 3, 1, 0, 0, 1); DateTime t_now = new DateTime(2008, 3, 31, 23, 59, 59); DateTime monthBegin = t_now.Date.AddDays(1 - t_now.Day);//减当前天数后加1 Response.Write(monthBegin.ToString("yyyy-MM-dd HH:mm:ss")); Response.Write("<br/>"); //上个月的月初 DateTime las
阅读全文