摘要:http://blog.sina.com.cn/s/blog_4c5bcd6701000are.html这是由于做项目看到的一个owner的用法,发现还算解释的可以1.Owner属性为form指定一个父窗口。这个属性在子窗口(form)作为非模态对话框使用时比较有用,它能使子窗口在非激活状态下不被父...
阅读全文
摘要:http://blog.sina.com.cn/s/blog_53ad31720100i2gl.html需要引用using System.Text.RegularExpressions;Regex r = new Regex("^\\s*([A-Za-z0-9_-]+(\\.\\w+)*@(\\w+...
阅读全文
摘要:http://www.cnblogs.com/greenerycn/archive/2010/07/17/use_datetime_parseexact.html //ShortDateFrom:yyyyMMdd格式化yyyy/MM/dd DateTime dt = DateTime.ParseEx...
阅读全文
摘要:http://www.0431cn.com/ygtd_wz_nr_2077.html一、日期和时间的格式化处理:1.绑定时格式化日期方法: 2.数据控件如DataGrid/DataList等的件格式化日期方法: e.Item.Cell[0].Text = Convert.ToDateTime(e.I...
阅读全文
摘要:/// /// /匿名类型测试 /// //参数名称、类型、顺序不同,则同一程序中声明的匿名类型实例不同 /// class AnonymousType { //测试匿名类型 public static void Test1() { var var1 = new { name ...
阅读全文
摘要://定义扩展方法 //1.类类型必须为静态的 //2. 类名为扩展方法的容器,扩展名是要被扩展的类型名称,既要其中添加方法的类 //3.this关键字是扩展方法标识,this关键字后面的类型为要扩展的类型 //4.this变量后面的的变量为参数列表 static class StringExten...
阅读全文
摘要:http://www.cnblogs.com/rush/archive/2012/05/15/2502264.html#lb1
阅读全文
摘要:一般处理程序后台 //获取页面参数 string count = context.Request["startCount"]; string descri = context.Request["starDescri"]; //返回处理结果 context.Response.Write("true"...
阅读全文
摘要://一般处理程序,GET方式提交(data:要传送的数据键值对) jQuery.ajax( { type: 'GET', url: 'GradeHandler.ashx?startCount&starDescri', data: { startCount: startCount, starDesc...
阅读全文
摘要:解决方法: 在实现IHttpHandler的同时,也要实现IRequiresSessionState接口,其命名空间为:System.Web.SessionState。 public class Logout : IHttpHandler, System.Web.SessionState.IReq...
阅读全文
摘要:public int UpdateImgs(FileUpload FileUpload1, HttpServerUtility server, int id) { //如果不是图片文件 if (!isImg(FileUpload1)) return 0; string fileName = Fil...
阅读全文
摘要:http://www.cnblogs.com/luminji/archive/2011/03/29/1997812.html
阅读全文
摘要:链接:http://www.360doc.com/content/11/0829/10/7532286_144170900.shtml
阅读全文
摘要:/* * 事务使用测试结论: * 1.开始事务前,数据库必须是打开状态; * 2.事务作用于DbCommand命令,因此,开启的事务就必须在执行事务操作之前对DbCommand实例指定事务; * * */如果不满足上...
阅读全文
摘要:1.定义enum orientation :byte { north=1, south=2, east=3, west=4 }2.使用//定义enum orientation myOrientation = orientation.east; System.Console.WriteLine(m...
阅读全文
摘要://报表路径srgstring strg = Application.StartupPath.ToString(); strg = strg.Substring(0, strg.LastIndexOf("\\")); strg = strg.Substring(0, strg.LastIndexOf...
阅读全文