lse123
06-17-2007, 09:38 AM
ASP/VBSCRIPT
When I fill a field in an html form , and this want to be an integer ... well when I get this with POST to an asp document, How I can check(validate) if this is an integer and appear appropriate message if it is not ?
entry=6778 or "78yut" or "khgdds"
<%
...
string = request.form("entry")
int = Cint(string)
If (not(isNumeric(int))) then
response.write "Please enter a number"
response.end
end if
...
%>
if entry="string" may avoid error [I will have error here ?] in
int = Cint(string)
?
When I fill a field in an html form , and this want to be an integer ... well when I get this with POST to an asp document, How I can check(validate) if this is an integer and appear appropriate message if it is not ?
entry=6778 or "78yut" or "khgdds"
<%
...
string = request.form("entry")
int = Cint(string)
If (not(isNumeric(int))) then
response.write "Please enter a number"
response.end
end if
...
%>
if entry="string" may avoid error [I will have error here ?] in
int = Cint(string)
?