asp 验证用户名是否包含有非常字符的函数
更新时间:2007年08月08日 12:09:32 作者:
<%
'******************************
'函数:IsValidUserName(byVal UserName)
'参数:UserName,用户名称
'作者:阿里西西
'日期:2007/7/15
'描述:验证用户名是否包含有非法字符,不含非法字符返回:true
'示例:IsValidUserName(byVal UserName)
'******************************
Function IsValidUserName(byVal UserName)
Dim i,c
IsValidUserName = True
For i = 1 To Len(UserName)
c = Lcase(Mid(UserName, i, 1))
If InStr("$!<>?#^%@~`&*();:+='"" ", c) > 0 Then
IsValidUserName = False
Exit Function
End IF
Next
End Function
%>
'******************************
'函数:IsValidUserName(byVal UserName)
'参数:UserName,用户名称
'作者:阿里西西
'日期:2007/7/15
'描述:验证用户名是否包含有非法字符,不含非法字符返回:true
'示例:IsValidUserName(byVal UserName)
'******************************
Function IsValidUserName(byVal UserName)
Dim i,c
IsValidUserName = True
For i = 1 To Len(UserName)
c = Lcase(Mid(UserName, i, 1))
If InStr("$!<>?#^%@~`&*();:+='"" ", c) > 0 Then
IsValidUserName = False
Exit Function
End IF
Next
End Function
%>
相关文章
Active Server Pages 错误 ''ASP 0201'' 修复方法
网上很多其他的解决方法, 但是我试了几个小时, 都没有解决问题, 最后是通过这个方法解决的.2010-07-07
使用ODBC数据库管理Serv-U的FTP用户及相关ASP编程[附源码示例下载]
使用ODBC数据库管理Serv-U的FTP用户及相关ASP编程[附源码示例下载]...2007-11-11
asp页面提示Response 对象 错误 ASP 0156 : 80004005 HTTP 头错误
访问asp页面时提示Response 对象 错误 ASP 0156 : 80004005 HTTP 头错误?,行 0 已将 HTTP 头输出到客户端浏览器。任何对 HTTP 头的修改都必须在输出页内容之前进行。2011-09-09


最新评论