上一页 1 ··· 5 6 7 8 9

2014年1月19日

摘要: 对DataTable进行过滤筛选的一些方法Select,dataview当你从数据库里取出一些数据,然后要对数据进行整合,你很容易就会想到:DataTable dt = new DataTable();//假设dt是由"SELECT C1,C2,C3 FROM T1"查询出来的结果 for (int i = 0; i < dt.Rows.Count; i++) { if (dt.Rows[i]["C1"].ToString() == "abc") //查询条件 { //进行操作 } } 但这种做法用一两次还好说,用多了就累了。那 阅读全文
posted @ 2014-01-19 12:31 壹飛臺 阅读(951) 评论(1) 推荐(0)
 

2013年11月22日

摘要: 1 var json= { "Type": "Coding", "Height":100 }; 2 3 for (var key in json) 4 { 5 alert(key); alert(json[key]); 6 } 7 8 $.each(json, function(i) { 9 alert(json[i]);10 alert(i);11 }); 阅读全文
posted @ 2013-11-22 16:39 壹飛臺 阅读(594) 评论(0) 推荐(0)
 

2013年11月19日

摘要: 1、HtmlEncode="False"2、DataFormatString="{0:d}"C#格式化日期时间DateTime dt = DateTime.Now;Label1.Text = dt.ToString();//2005-11-5 13:21:25Label2.Text = dt.ToFileTime().ToString();//127756416859912816Label3.Text = dt.ToFileTimeUtc().ToString();//127756704859912816Label4.Text = dt.ToLocalT 阅读全文
posted @ 2013-11-19 00:01 壹飛臺 阅读(527) 评论(0) 推荐(0)
 

2013年11月9日

摘要: jquery转换json对象为字符串 JSON.stringify(jsonObject),可用于单个JSON对象,也可用于JSON数组alert(JSON.stringify(jsonObject));单个json:var d = { id: 1, "type": "singer" }, { id:2, "type": "singer2"};alert(JSON.stringify(d));json数组:var d = [{ id: 1, "type": "singer" 阅读全文
posted @ 2013-11-09 18:15 壹飛臺 阅读(1722) 评论(0) 推荐(0)
 

2013年11月8日

摘要: Repeater中:使用Container.ItemIndex获取行号1 2 3 行号: 4 5 如果要从1开始,则1 2 3 行号: 4 5 GirdView中:使用Container.DataItemInde获取行号,同理从1开始,也可以用1 2 3 4 5 6 7 8 9 阅读全文
posted @ 2013-11-08 14:48 壹飛臺 阅读(400) 评论(0) 推荐(0)
 
摘要: using System.Web.Script.Serialization;protected void Page_Load(object sender,EventArgs e){//构建json对象stringjsonstring="[ {posid:'611',city:'成都市'}, {posid:'621',city:'上海市'}, {posid:'631',city:'重庆市'}, {posid:'641',city:'海口市'} ]"; 阅读全文
posted @ 2013-11-08 14:21 壹飛臺 阅读(617) 评论(0) 推荐(0)
 
上一页 1 ··· 5 6 7 8 9