posts - 118,  comments - 276,  views - 45万
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
06 2008 档案
[原]ASP.NET处理异常的另一种方式
摘要:常见的处理异常方式有两种: 1.Web.config 2.Application_Error 这两种就不多说了,网上非常多 但可能是C/S的程序写多了,有时总觉得用着不舒服,因此想把换个自已认为舒服点的方式处理异常。 前提:使用了MasterPage 1.在MasterPage中输入以下代码: 1 internal void ShowError(Exception ex) 2... 阅读全文
posted @ 2008-06-24 00:38 think8848 阅读(320) 评论(0) 推荐(0) 编辑
啥都不说了,不枉熬油点灯了
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> 1private void AddCode(Form form) 2{ 3 IDesignerHost host = null; 4 host = (IDesignerHost)... 阅读全文
posted @ 2008-06-15 01:25 think8848 阅读(410) 评论(1) 推荐(1) 编辑
[转]Design Time Serialization
摘要:54.1 How to make my Component add itself to the contained Form's IContainer list? You do this inorder to ensure that your component gets disposed along with the contained Form (logical parent).... 阅读全文
posted @ 2008-06-15 01:06 think8848 阅读(511) 评论(0) 推荐(0) 编辑
获取SQL命令字符串中的参数名列表
摘要:1//清除命令字符串中的所有字符串 2string commandTextNoString = Regex.Replace(command.CommandText, @"['][\S]*[']", ""); 3 4Regex regex = new Regex(@"@[^,\s)]*"); 5//获取参数名列表 6MatchCollection matchs = regex.Matches(com... 阅读全文
posted @ 2008-06-04 13:58 think8848 阅读(587) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示