李空

博客园 首页 新随笔 联系 订阅 管理

2013年11月29日 #

摘要: 前台代码: 1 2 3 4 5 6 7 8 9 10 38 39 40 41 42 43 44 45 46 47 View Code Json代码: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 6 namespace XML操作 7 { 8 /// 9 /// Json 的摘要说明10 /// 11 public cla... 阅读全文
posted @ 2013-11-29 23:24 李空 阅读(170) 评论(0) 推荐(0)

摘要: 15与241 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ~/index.html 22 ~/index.aspx 23 24 25 26 ~/product/inde... 阅读全文
posted @ 2013-11-29 23:16 李空 阅读(334) 评论(0) 推荐(0)

2013年11月17日 #

摘要: 前台代码: 1 3 4 6 7 8 9 10 11 12 13 14 15 16 第1页17 共条数据18 共页19 20 21 首页22 上一页23 下一页24 末页25 27 28 29 View Code 后台代码: 1 protec... 阅读全文
posted @ 2013-11-17 17:40 李空 阅读(399) 评论(0) 推荐(0)

摘要: /// /// GB2312编码 /// /// 待编码字符 /// 编码结果 1 public static string GB2312(string str) 2 { 3 StringBuilder sb = new StringBuilder(); 4 //GB2321的编码方式 5 byte[] byStr = System.Text.Encoding.GetEncoding ("GB2312").GetBytes(str); 6 for (int i = 0; i... 阅读全文
posted @ 2013-11-17 16:29 李空 阅读(209) 评论(0) 推荐(0)

摘要: 时间间隔: 1 using System.Timers;//命名空间 2 3 Timer atimer = new Timer(5000);//指定时间间隔5秒 4 atimer.Elapsed += new ElapsedEventHandler(atimer_Elapsed); 5 6 7 atimer.AutoReset = true; //设置每次执行间隔事件 8 atimer.Enabled = true; //设置启用时间间隔事件 9 10 11 12 13 14 15 16 void atimer_Elapsed(object sender, ElapsedEve... 阅读全文
posted @ 2013-11-17 16:18 李空 阅读(287) 评论(0) 推荐(0)

摘要: //四舍六入Response.Write(Math.Round(3.45, 1));//四舍五入Response.Write(Math.Round(3.45, 1,MidpointRounding.AwayFromZero));//字符串格式转时间格式DateTimeFormatInfo dtFormat = new DateTimeFormatInfo { LongDatePattern = "yyyy/MM/dd hh:mm:ss" };DateTime dateT = Convert.ToDateTime("2012/06/08 09:10:10" 阅读全文
posted @ 2013-11-17 15:24 李空 阅读(159) 评论(0) 推荐(0)