Você está na página 1de 1

EXEMPLO DE VALIDAO DE FORMULARIOS:

Crie o seguinte arquivo e salve com o nome exemploformulario1.asp :

<html>
<head><title>formulario</title></head>
<body>
<form name= teste action =formulario2.asp method=post >
Usuario <input type=text name=usuario><br>
Senha <input type=text name=senha><br>
<input type=submit value=enviar>
<input type=reset value=enviar>
</form>
</body>
</html>
Crie o seguinte arquivo abaixo e salve com o nome exemploformulario2.asp :
<html>
<head><title>formulario</title></head>
<body>
<%
session (usuario) = request.form(login)
if session(tratamento)=empty then
response.write este campo no pode ser vazio
end if
session (senha) = request.form(senha)
if session(senha) = empty then
response.write este campo no pode ser vazio
end if
%>
</body>
</html>

Você também pode gostar