随笔分类 -  ASP.NET

C# 线程、timer例句
摘要:Thread thread = new Thread(new ThreadStart(delegate() { oledbConn.Open(); foreach (DataRow x in yxdms) { toCut(x["yxdm"].ToString().Trim()); } oledbConn.Close(); })); ... 阅读全文

posted @ 2013-03-12 15:04 ayao 阅读(225) 评论(0) 推荐(0)

c# delegate应用一例,类似于javascript中直接写的回调函数
摘要:c# delegate应用一例,类似于javascript中直接写的回调函数: //新增和修改操作 list.ForEach(delegate(Object obj) { console.write(obj.toString()); } });//end forEach 阅读全文

posted @ 2013-03-05 17:11 ayao 阅读(208) 评论(0) 推荐(0)

flexigrid js表格控件在IE7下内容显示为空白
摘要:问题:在测试自己的一段代码时发现IE7下,flexigrid表格内容显示为空白,但是下方的翻页栏中正常显示了记录数。同样的页面在火狐、ie8下显示正常。解决:对比能够政策显示的flexigrid表格发现,页面中的容器标签用div:<div id="tt"></div>,而正常显示的页面用的是table标签。替换为<table id="tt"></table>时,正常显示,问题解决。 阅读全文

posted @ 2012-10-30 13:26 ayao 阅读(560) 评论(0) 推荐(0)

c#遍历枚举中的项
摘要:Type type = typeof(enumTest); foreach (FieldInfo x in type.GetFields(BindingFlags.Public | BindingFlags.Static)) { enumTest item = (enumTest)x.GetValue(null); }思路:遍历枚举的公共且静态的Field,获取Field的值;然后将值强制转为枚举类型。 阅读全文

posted @ 2012-08-31 09:49 ayao 阅读(846) 评论(0) 推荐(0)

c#使用HttpWebRequest向指定url Post数据
摘要:HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://www.yang1.com/test.aspx"); request.Method="POST"; request.ContentType = "application/x-www-form-urlencoded"; byte[] byteArr = Encoding.UTF8.GetBytes("a=test"); request.ContentLe... 阅读全文

posted @ 2012-08-31 09:42 ayao 阅读(333) 评论(0) 推荐(0)

导航