<%@ Page Language="VB"%>
<script runat="server">
sub enter-click(sender as object,e as eventargs)
message.text = username.text & "您好,欢迎光临我的主页"
end sub
</script>
<html>
<head>
<title>一个简单的例子</title>
</head>
<body>
<form runat="server">
请输入您的姓名:
<asp:TextBox ID="username" runat="server" />
<asp:Button ID="enter" Text="确定" OnClick="enter_click" runat="server" />
<p>
<asp:Label ID="message" runat="server" />
</form>
</body>
</html>
为啥预览只有"请输入您的姓名:"别的不出来啊,帮忙看看那儿出问题了?
參考答案:<asp:Button ID="enter" Text="确定" OnClick="enter_click" runat="server" />
sub enter-click(sender as object,e as eventargs)
你看出有什么不同了没有?
一个是enter_click,一个是enter-click