摘要: SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE TRIGGER sdictuser.trg_PermitInfo ON sdictuser.tb_PermitInfo AFTER DELETEAS BEGINSET NOCOUNT ON;DELETE FROM ssd.sduser.tb_user WHERE lgname = (SELECT struserid FROM deleted)ENDGO 阅读全文
posted @ 2010-03-16 17:48 Jack Tang 阅读(534) 评论(0) 推荐(0) 编辑
摘要: ASP.NET通过Global.asax和Timer定时器定时运行后台代码Global.asax文件1.Application_Start方法添加 // 在应用程序启动时运行的代码 System.Timers.Timer myTimer = new System.Timers.Timer(60000); myTimer.Elapsed += new System.Timers.ElapsedEventHandler(OnTimedEvent); myTimer.Interval = 60000; myTimer.Enabled = true;2.添加方法 private void OnTime 阅读全文
posted @ 2010-03-16 17:46 Jack Tang 阅读(412) 评论(0) 推荐(0) 编辑
摘要: Javascript中使用正则表达式进行数据验证<script language="javascript">function checkMobile(mobile){ var reg =/^0{0,1}(13[0-9]?|15[89])[0-9]{8}$/;if(!reg.test(mobile)){alert("不正确的手机号码!");}else{alert("正确的手机号码!");}} </script> 阅读全文
posted @ 2010-03-16 17:46 Jack Tang 阅读(252) 评论(0) 推荐(0) 编辑
摘要: Asp.Net中使用正则表达式进行数据验证using System.Text.RegularExpressions;private bool checkMobile(string mobile){string regex0 = @"\d{11}"; string regex = @"(13[0-9]?|15[89])[0-9]{8}"; if (!Regex.IsMatch(mobile, regex0) || !Regex.IsMatch(mobile, regex)) { return false; }return true;}详细内容可参考 &qu 阅读全文
posted @ 2010-03-16 17:45 Jack Tang 阅读(245) 评论(0) 推荐(0) 编辑
摘要: wsdl.exe /l:cs /n:myNamespace /out:myFilename.cs http://www.abc.com/hello/hello.asmx?wsdl将生成的文件如myFilename.cs,通过CSC或者VBC编译工具,生成相应的Proxy Dll文件即可如:csc /target:library /out:"c:\proxy.dll" c:\proxy.cs wsdl /l:cs /n:BbsInterface /out:ForPngWebService.cs http://10.0.0.1/ForPngWebService.asmx?wsd 阅读全文
posted @ 2010-03-16 17:44 Jack Tang 阅读(4110) 评论(0) 推荐(0) 编辑
摘要: 字符串和Byte数组互换的两个方法适用环境:.net1. 使用Encoding类,字符集可以换成ASCII,UTF7等txtOutput.Text = System.Text.Encoding.UTF8.GetString(Encoding.UTF8.GetBytes(txtInput.Text));2. 使用Convert类// 当Convert.FromBase64String方法的参数的长度小于4或不是4的倍数时,将会抛出FormatException。txtOutput.Text = System.Convert.ToBase64String(Convert.FromBase64Str 阅读全文
posted @ 2010-03-16 17:43 Jack Tang 阅读(375) 评论(0) 推荐(0) 编辑
摘要: http://www.codeproject.com/KB/aspnet/DisableSubmitButton.aspxDisable ASP Button on Submit and capture the PostBack OnClick EventBy Christopher G. LasaterThis article describes how to disable a ASP button on click to prevent multiple clicks and still fire the button event on the server.override prote 阅读全文
posted @ 2010-03-16 17:43 Jack Tang 阅读(173) 评论(0) 推荐(0) 编辑
摘要: Sql Server数据库迁移孤立用户的问题处理适用数据库: SQL Server 7.0、SQL Server 2000 和 SQL Server 2005表面现象: 对象名 ‘xxxx’ 无效 Login failed for user '%ls'. Server user '%.*ls' is not a valid user in database '%.*ls'. 服务器用户“%s”不是数据库“%s”中的有效用户。请先将该用户帐户添加到数据库中进一步的现象: 创建和以前用户相同帐号(如test),相同密码的帐号,还是不能访问属于以前用户 阅读全文
posted @ 2010-03-16 17:42 Jack Tang 阅读(203) 评论(0) 推荐(0) 编辑