手机
当前位置:查字典教程网 >编程开发 >asp.net教程 >asp.net 按字节检查包含全半角的文字
asp.net 按字节检查包含全半角的文字
摘要:'''-------------------------------------------------------------------...

'''------------------------------------------------------------------------

''' <summary>

''' 文字列長检查(按字节检查)

''' </summary>

''' <param name="argStrControl">文字列</param>

''' <param name="argLength">文字列長</param>

''' <returns>True - , False - </returns>

''' <remarks></remarks>

'''------------------------------------------------------------------------

Public Shared Function CheckControlLength(ByVal argStrControl As String, _

Optional ByVal argLength As Integer = 0) As Boolean

'NULL

If String.IsNullOrEmpty(argStrControl) Then

Return True

End If

'文字列長

Dim iLength As Integer = 0

iLength = pEncoding.GetBytes(argStrControl).Length()

'文字列長检查

If argLength < iLength Then

Return False

End If

Return True

End Function

【asp.net 按字节检查包含全半角的文字】相关文章:

asp.net Ajax 安装与卸载方法

asp.net 半角全角转化工具

asp.net Timer的使用方法

asp.net两级联动(包含添加和修改)

asp.net 生成数字和字母组合的随机数

asp.net 操作excel的实现代码

asp.net C#检查URL是否有效的方法

asp.net在后端动态添加样式表调用的方法

Asp.net 字符串操作基类(安全,替换,分解等)

asp.net获取HTML表单File中的路径的方法

精品推荐
分类导航