代码改变世界

阅读排行榜

文件操作帮助类

2013-07-17 15:30 by Carl Xing, 272 阅读, 收藏,
摘要: 文件操作帮助类: /// /// 对文件上传操作的帮助类 /// public class FileManager { /// /// 上传文件目录名称 /// private static string FileFolder = ConfigurationSettings.AppSettings["UploadFolder"]; /// /// 上传文件基础目录 /// private static string BaseFolder = ... 阅读全文

Custom ServerControl

2011-08-26 16:11 by Carl Xing, 259 阅读, 收藏,
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace ServerControl.Controls{ publicclass MostSimpleControl:Control { // Control类的呈现架构就是这样在三个方法之间递归的调用,以便把控件的逻辑呈现为html代码。 protectedoverridevoi... 阅读全文

单条目选择控件

2013-06-09 18:59 by Carl Xing, 256 阅读, 收藏,
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI.WebControls;using System.Web.UI.HtmlControls;namespace Gyyx.EOV3.Web.UserControl{ /// /// 键值对选择 /// public class ItemSelector : CompositeControl { private TextBox tbItemText; ... 阅读全文

SqlBulkCopy的使用

2012-11-22 17:12 by Carl Xing, 250 阅读, 收藏,
摘要: 将datatable 中的表写入一张临时表。注意:临时表只存在与一个连接中,只有当前连接可以操作临时表,当连接关闭,临时表消失。 DataTable dt = new DataTable(); dt.Columns.Add("col", typeof(int)); for (int i = 10000; i < 100000; i++) { dt.Rows.Add(new object[] { i }); } string connS... 阅读全文

阻止保存要求重新创建表的更改---取消自增主键遇到的问题

2013-03-06 16:58 by Carl Xing, 245 阅读, 收藏,
摘要: 阅读全文