欢乐颂2包奕凡那集受伤:(急)求助:asp.net纯菜鸟问题!!!

来源:百度文库 编辑:中科新闻网 时间:2024/04/27 13:48:06
按照教程写了抄了一段源程序!

调试不能通过!

把第五行的then去掉却能通过!!

但是有问题,输入的密码跟确认密码一致的时候也报错!

年龄已是!

程序如下,望高手相助!!

<%@ Page Language="VB" Debug="true" %>
<script runat="server">
sub ValidBotton_Click(Sender As Object,E As Eventargs)
if trim(name.value)<>"" and trim(pass.value)<>""and trim(age.value)<>""
then
Labell.text=ValidAtorData()
else
labell.text=""
end if
end Sub
Function ValidatorData()
dim ValidStr as string
if len(name.value)>6 then
ValidStr="编号长度不能大于6位"
end if
if Validator1.isvalid then
ValidStr=ValidStr & validator1.errormessage
end if
if Validator2.isvalid then
ValidStr=ValidStr & validator2.errormessage
end if
if trim(ValidStr)="" then
ValidatorData="数据验证成功!"
else
ValidatorData="数据验证失败!"& trim(ValidStr)
end if
End Function
</script>
<html>
<head>
<meta http-equiv="Content-language" content="zh-cn" />
<meta heep-equiv="Content-Type" content="text/html;charset=gb2312" />
<title>用户数据验证</title>
</head>
<body bgcolor="#ffddce">
<h2 align="center">
<font face="楷体_GB2312" color="#000000">请输入你的个人信息 </font>
</h2>
<hr />
<br />
<form runat="server">
<center>
<table height="198" cellspacing="0" cellpadding="0" width="69%" border="0">
<tr>
<td align="right" width="33%" height="33">
您的编号:
</td>
<td align="middle" width="26%" height="33">
<input id="name" type="text" size="16" runat="Server" />
</td>
<td width="41%" height="33">
<small>(长度不能大于6位) </small></td>
</tr>
<tr>
<td align="right" width="33%" height="33">
您的密码: