
VS2008
文章平均质量分 65
peter521
aa
展开
-
DataTable数据源的创建
一、首先创建列DataTable dt=new DataTable();dt.Columns.Add("列名1",typeof(string));dt.Columns.Add("列名2",typeof(string));dt.Columns.Add("列名3",typeof(string));二、构建行DataRow dr = dt.NewRow();dr[0] =原创 2008-08-01 10:32:00 · 1520 阅读 · 0 评论 -
LINQ批量删除符合条件的数据
批量处理数据的方法:CCPressDataContext cp = new CCPressDataContext();IQueryableBookInfoMaterial> aa = from a in cp.BookInfoMaterial where a.AuthorName.Contains("aa")原创 2008-09-05 09:20:00 · 6879 阅读 · 1 评论 -
Convert.ToString 与 .ToString() 有什么区别?
当对象为null时,Convert.ToString(null) 是没问题的,而 string str = null; str.ToString() ; 就会出现错误。此种情况尤其会发生在页面绑定数据的时候。原创 2008-09-11 10:22:00 · 891 阅读 · 0 评论 -
冒泡排序法
将下列数组中的数字由小到大排序:下面使用冒泡排序法排序。int[] a = new int[10] { 2, 5, 6, 9, 8, 7, 4, 0, 3, 1 }; for (int i = 0; i { for (int j = i + 1; j { if (a[j]原创 2008-10-30 22:52:00 · 706 阅读 · 0 评论 -
动态加载用户自定义控件
需要将一个用户自定义控件动态加载到这个div中,在Page_load中写上如下代码: if (!IsPostBack) { Control ct = Page.LoadControl("NewsList2.ascx"); DR.Controls.Add(ct); }即可。原创 2009-01-07 09:56:00 · 1021 阅读 · 0 评论 -
区域性名称和标识
区域性名称和标识符2007-06-27 09:50区域性/语言名称区域性标识符 区域性""(空字符串) 0x007F 固定区域性af 0x0036 南非荷兰语 af-ZA 0x0436 南非荷兰语(南非)sq 0x001C 阿尔转载 2008-11-26 13:53:00 · 1111 阅读 · 0 评论 -
GridView 编辑、更新、取消
前台: onrowcancelingedit="GridView1_RowCancelingEdit" DataKeyNames="RollMessageID" onrowediting="GridView1_RowEditing" onrowupdating="GridView1_RowUpdating">原创 2008-12-16 09:03:00 · 1987 阅读 · 2 评论