F
fancylxs
Unregistered / Unconfirmed
GUEST, unregistred user!
这是一个ASP.NET代码,有一个毛病,我已经对过书了,没什么错误,可还是不能执行.
<script language="vb" runat="server">
sub my_click(sender as boject,e as eventargs)
end sub
</script>
<html>
<body>
<form runat="server">
姓名:<asp:textbox id="myname" runat="server"/>
<asp:regularexpressionvalidator id="checkname" runat="server" controltovalidate="myname" validationexpression=".{2,}" text="必填文本框" errormessage="姓名文本框输入错误,最少填入两个字符"/>
<br>
e.mail:<asp:textbox id="mymail" runat="server"/>
<asp:regularexpressionvalidator id="checkmail" runat=server" controltovalidate="mymail" validationexpression=".{1,}@.{3,}/..{1,}" text="必填文本框" errormessage="e-mail文本框输入错误,请填写正确格式的电子邮件信箱"/>
<br>
住址:<asp:textbox id="myaddress" runat="server"/>
<asp:regularexpressionvalidator id="checkaddress" runat="server" controlvalidate="myaddress" validationexpression=".{1,}(县|市).{1,}(市|镇|乡|区).{1,}(路|街|道).{1,}号.{0,}" text="必填文本框" errormessage="住址文框输入错误,请详细填你的居住地址"/>
<br>
<asp:button id="mybutton" runat="server" onclick="my_click" text="确定"/>
<asp:validationsummary id="check" runat="server" headertext="请按下列说明输入文本框数据" displaymode="bulletlist"/>
</form>
</body>
</html>
<script language="vb" runat="server">
sub my_click(sender as boject,e as eventargs)
end sub
</script>
<html>
<body>
<form runat="server">
姓名:<asp:textbox id="myname" runat="server"/>
<asp:regularexpressionvalidator id="checkname" runat="server" controltovalidate="myname" validationexpression=".{2,}" text="必填文本框" errormessage="姓名文本框输入错误,最少填入两个字符"/>
<br>
e.mail:<asp:textbox id="mymail" runat="server"/>
<asp:regularexpressionvalidator id="checkmail" runat=server" controltovalidate="mymail" validationexpression=".{1,}@.{3,}/..{1,}" text="必填文本框" errormessage="e-mail文本框输入错误,请填写正确格式的电子邮件信箱"/>
<br>
住址:<asp:textbox id="myaddress" runat="server"/>
<asp:regularexpressionvalidator id="checkaddress" runat="server" controlvalidate="myaddress" validationexpression=".{1,}(县|市).{1,}(市|镇|乡|区).{1,}(路|街|道).{1,}号.{0,}" text="必填文本框" errormessage="住址文框输入错误,请详细填你的居住地址"/>
<br>
<asp:button id="mybutton" runat="server" onclick="my_click" text="确定"/>
<asp:validationsummary id="check" runat="server" headertext="请按下列说明输入文本框数据" displaymode="bulletlist"/>
</form>
</body>
</html>