这是一个asp.net的全文教程.里面还有数据库的数据.对初学者有很大的帮助
源代码在线查看: ch07-06-01.aspx
Ch07-06-01.aspx 命令按钮控件
' 用户单击“登录”按钮的处理事件
Sub Submit_Click(obj As Object, e As Eventargs)
Dim strA As String
strA = "登录账号:" & UserID.Value & ""
strA = strA & "使用密码:" & UserPWD.Value & ""
Show1.InnerHTML = strA
End sub
' 清除各输入控件的文字内容
Sub Rstbtn_Click(obj As Object, e As Eventargs)
UserID.Value = ""
UserPWD.Value = ""
End sub
用户账号:
ID="UserID"
Size=30
Runat="Server">
用户密码:
ID="UserPWD"
Size=30
Runat="Server">
ID="Submits"
Name="SubmitType"
Value="登录"
OnServerClick="Submit_Click"
Runat="Server">
ID="Reset"
Name="Rstbtn"
Value="重设"
OnServerClick="Rstbtn_Click"
Runat="Server">