摘要: 本次项目主程序文件分离framework前,大小是1.2m分离后为85K使用Release模式又减小为65K当然,实际加载的时候,各个module和framework的体积也还是要算进去的, 阅读全文
posted @ 2009-04-09 13:29 5x10 阅读(644) 评论(0) 推荐(0)
摘要: 用一个最简洁的办法吧:通过 parentApplication 两个共生模块间进行通信 在一个application 中同时加载两个模块module1和module2在module1中有方法func1()在module2中可以这样调用parentApplication.module1.child.func1();注意child因为module1是parentApplication中的模块,实际上是... 阅读全文
posted @ 2009-04-09 11:37 5x10 阅读(619) 评论(0) 推荐(0)
摘要: 找到msde安装目录下的setup.ini,打开修改成下面这个样子[Options]SECURITYMODE=SQLSAPWD=123其中SAPWD后的"123"是你的sa的密码。(你也可以改成你自己的)。然后双击安装即可.●Windows XP 的本地安全策略“设备:未签名驱动程序的安装操作”。 ●Windows 2000 的本地安全策略“未签名非驱动程序的安... 阅读全文
posted @ 2009-04-09 09:30 5x10 阅读(1336) 评论(0) 推荐(0)
摘要: 查询当天的内容:select * from article where datediff(day,时间字段,getdate())=0 本周:select * from article where datediff(week,时间字段,getdate())=0 DateTime dd = (DateTime)ds.Tables[0].Rows[i]["pubdate"]; if (Da... 阅读全文
posted @ 2009-01-08 12:46 5x10 阅读(191) 评论(0) 推荐(0)
摘要: 查询数据库 select * From master.dbo.sysdatabases where name='数据库名' and status512 --读取库中的所有表名 (当前数据库)select name from sysobjects where xtype='u' --读取指定表的所有列名 select name from syscolumns where id=(select ma... 阅读全文
posted @ 2009-01-04 09:17 5x10 阅读(2014) 评论(0) 推荐(0)
摘要: 1。 C# 中 字符串常量可以以 @ 开头声名,这样的优点是转义序列“不”被处理,按“原样”输出,即我们不需要对转义字符加上 (反斜扛),就可以轻松coding。如 string filePath = @"c:DocsSourcea.txt"; // rather than "c:DocsSourcea.txt" 2。如要在一个用 @ 引起来的字符串中包括一个双引号,就需要使用两对双引号了。 这时... 阅读全文
posted @ 2009-01-03 13:42 5x10 阅读(3493) 评论(0) 推荐(0)
摘要: file和fileInfo: File类是静态类,由于所有的File方法都是静态的,所以如果只想执行一个操作,那么使用File方法的效率比使用相应的FileInfo 实例方法可能更高。所有的File方法都要求当前所操作的文件的路径。File 类的静态方法对所有方法都执行安全检查。如果打算多次重用某个对象,可考虑改用FileInfo的相应实例方法,因为并不总是需要安全检查。 file,directo... 阅读全文
posted @ 2009-01-03 13:41 5x10 阅读(303) 评论(0) 推荐(0)
摘要: 使用c#莫名其妙丢失session和cookie的问题, 终于找到原因, ie6对p3p协议的支持,真是有点搞笑 所谓p3p,就是对跨域的cookie做出的安全限制, 但是到了微软这里,不知道怎么就变味了,同一站点下,也会莫名其妙的丢掉COOKIE, 例如:框架页,页面跳转,用户控件等。 解决办法:为站点配置p3p协议信息 阅读全文
posted @ 2009-01-03 13:35 5x10 阅读(980) 评论(0) 推荐(0)
摘要: 使用window.location = ''; cursor:pointer; 阅读全文
posted @ 2009-01-02 16:30 5x10 阅读(108) 评论(0) 推荐(0)
摘要: 创建: HttpCookie cookie = new HttpCookie("regID"); cookie .Value = username; cookie .Expires = DateTime.Now.AddDays(1); Response.Cookies.Add(cookie); 创建有子键的: Respons... 阅读全文
posted @ 2009-01-02 10:38 5x10 阅读(751) 评论(0) 推荐(0)