停灯向晓  
上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页

2010年3月15日

摘要: /* from: http://topic.csdn.net/t/20051208/20/4447231.html*/字段rowno int identity(1,1),在delete完数据之后,如何让rowno再次从1开始自动增长?TRUNCATE TABLE name************************* 下例强制 jobs 表中的当前标识值为 30。 USE pubs GO DBCC CHECKIDENT (jobs, RESEED, 30) GO*************************TRUNCATE TABLE ... 阅读全文
posted @ 2010-03-15 11:00 kofkyo 阅读(314) 评论(0) 推荐(0)
 
摘要: /* from: http://www.diybl.com/course/7_databases/sql/sqlServer/2007106/77007.html*/远程登录SQL2005出错Error: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not a 阅读全文
posted @ 2010-03-15 10:04 kofkyo 阅读(640) 评论(0) 推荐(0)

2010年2月2日

摘要: /* DataSet hell - "Failed to enable constraints. One or more rows contain values...." */使用DataSet的时候遇到这么个错误:Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints."One or more"到底是什么,不知道。找到错误的方法是,使用DataTable的GetErrors方法 阅读全文
posted @ 2010-02-02 10:56 kofkyo 阅读(290) 评论(0) 推荐(0)

2010年1月18日

摘要: 本文翻译自:Mixing Forms and Windows Security in ASP.NET摘要:ASP.NET开发人员曾经问到过如何使用Forms和Windows混合验证。Paul Wilson提供了一个解决方案来获得Windows用户名,或者,将用户转向登录页面。简介我曾经遇到很多ASP.NET开发人员问到如何使用Forms和Windows混合验证。通常的回答是:“ASP.NET不支持混合验证”。不谈技术细节,让我们先从业务的角度来看一下。我们要做的是自动取得域用户名,并且将其他用户转向登录页面。这样可行吗?当然。Forms验证首先,需要确定要使用哪种ASP.NET验证。想要使用F 阅读全文
posted @ 2010-01-18 16:21 kofkyo 阅读(550) 评论(0) 推荐(0)

2010年1月15日

摘要: /* from: http://hi.baidu.com/jmtbai/blog/item/3309d20238f5d983d53f7cd5.html*/ASP.NET 2.0改善了模板中的数据绑定操作,把v1.x中的数据绑定语法DataBinder.Eval(Container.DataItem, fieldname)简化为Eval(fieldname)。Eval方法与DataBinder.Eval一样可以接受一个可选的格式化字符串参数。缩短的Eval语法与DataBinder.Eval的不同点在于,Eval会根据最近的容器对象(例如DataListItem)的DataItem属性来自动地解 阅读全文
posted @ 2010-01-15 16:02 kofkyo 阅读(351) 评论(0) 推荐(0)

2009年12月28日

摘要: 看到[ ] 字符组(Character Classes) 这节,最后的例子,突然想到,如何来匹配不包含“abc”子字符串的字符串。写来写去,还就是写不出来,照猫画虎,写了个^.*(?!abc).*(?!abc)$,看起来应该可以,跑出来不是那么回事。对于如下的输入:abcklkjlkjklkjljalklkjlkabclklkjlkjlabckljklakljkljlj可以判读出"abcklkjlkjk"和"lkjlkjlabc",但对于"kjlkabclk"这种子字符串在中间的情况,就不能解决。想着用个逆序否定,^.*(?!abc) 阅读全文
posted @ 2009-12-28 17:09 kofkyo 阅读(138) 评论(0) 推荐(0)

2009年12月25日

摘要: 这两天事情比较少一点,看了lxcnn(过客)博客里的正则表达式,顺便做个笔记吧。老了,还是记下来比较好。首先,要看一下NFA引擎匹配原理,了解原理是很重要的[ ] 字符组(Character Classes) []能够匹配所包含的一系列字符中的任意一个。需要注意的是,[]虽然能匹配其中的任意一个字符,但匹配的结果只能是一个字符,不是多个。因为[]本身表示的就是字符之间“或”的关系,因此在[]中使用“|”来表示“或”的关系是错误的。[^ ]表示匹配任意一个未列举的字符,同样的,匹配的结果也只能是一个字符。/b在字符组外表示单词边界,但是在字符组内[/b]表示退格符正则基础之——捕获组(captu 阅读全文
posted @ 2009-12-25 16:49 kofkyo 阅读(270) 评论(0) 推荐(0)
 
摘要: /* from: http://www.dotneteer.com/Weblog/post/2006/03/Page-postback-twice-in-ASPNET-20-when-ButtonType-is-set-to-Image-in-GridView.aspx*/以下为全文引用,我没有验证:Page postback twice in ASP.NET 2.0 when ButtonType is set to Image in GridViewThis problem has driven me nuts for several hours before I found an ans 阅读全文
posted @ 2009-12-25 15:59 kofkyo 阅读(192) 评论(0) 推荐(0)
 
摘要: /* from: http://topic.csdn.net/u/20090712/17/d40e7153-d6d1-4a65-b20e-5ad6f92533a3.html*/需求:通过.net的正则 http://www.aa.bb.com htp://aa.bb.com aa.bb.com 上面3个都得到 aa 并对语句稍微讲解一下。谢谢。 (? <=http://)(/w+) 这个是我写的。不知道怎么加上或者匹配www 还有? <= 这个什么意思查不到。解决:(?i)(?<=^|http://(?:www/.)?)(?!www/.)/b/w+(?!/./w+$)(?=( 阅读全文
posted @ 2009-12-25 15:38 kofkyo 阅读(204) 评论(0) 推荐(0)

2009年12月24日

摘要: /* from: http://www.cnblogs.com/dreamof/archive/2009/03/13/1410923.html*/1、Request获取url各种信息的方法 测试的url地址:http://www.test.com/testweb/default.aspx, 结果如下: Request.ApplicationPath: /testweb Request.CurrentExecutionFilePath: /testweb/default.aspx Request.FilePath: /testweb/default.aspx Request.Path:... 阅读全文
posted @ 2009-12-24 16:30 kofkyo 阅读(302) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页