Y
yezanxiong
Hi Everyone,
I am new in asp.net, and i am not quite familar with javascipt. I know how
to use javascript to force textbox's input turn to uppercase, here is the
sample code.
Dim oStrBuilder As System.Text.StringBuilder = New System.Text.StringBuilder
oStrBuilder.Append("<script language='javascript'>")
oStrBuilder.Append("function Upper(e,r) {")
oStrBuilder.Append("if (e.keyCode > 96 && e.keyCode < 123) ")
oStrBuilder.Append(" e.keyCode = e.keyCode - 32; ")
oStrBuilder.Append("}")
oStrBuilder.Append("</script>")
If (Not IsClientScriptBlockRegistered("UPPER")) Then
RegisterClientScriptBlock("UPPER", oStrBuilder.ToString)
End If
But I don't know how to limit textbox can only input plus number? Is that
anyone has the sample code or someone can write it for me?
Thanks a lot.
Yezanxiong
I am new in asp.net, and i am not quite familar with javascipt. I know how
to use javascript to force textbox's input turn to uppercase, here is the
sample code.
Dim oStrBuilder As System.Text.StringBuilder = New System.Text.StringBuilder
oStrBuilder.Append("<script language='javascript'>")
oStrBuilder.Append("function Upper(e,r) {")
oStrBuilder.Append("if (e.keyCode > 96 && e.keyCode < 123) ")
oStrBuilder.Append(" e.keyCode = e.keyCode - 32; ")
oStrBuilder.Append("}")
oStrBuilder.Append("</script>")
If (Not IsClientScriptBlockRegistered("UPPER")) Then
RegisterClientScriptBlock("UPPER", oStrBuilder.ToString)
End If
But I don't know how to limit textbox can only input plus number? Is that
anyone has the sample code or someone can write it for me?
Thanks a lot.
Yezanxiong