📄 login.aspx.vb
字号:
Public Class Login
Inherits System.Web.UI.Page
Protected WithEvents btnSubmit As System.Web.UI.WebControls.Button
Protected WithEvents txtEmail As System.Web.UI.WebControls.TextBox
Protected WithEvents txtPwd As System.Web.UI.WebControls.TextBox
Protected WithEvents Table2 As System.Web.UI.WebControls.Table
Protected WithEvents btnReset As System.Web.UI.HtmlControls.HtmlInputButton
Protected WithEvents Form1 As System.Web.UI.HtmlControls.HtmlForm
Protected WithEvents lblMsg As System.Web.UI.WebControls.Label
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
If Page.IsValid = True Then
Dim obj As C2CSystem.Person = New C2CSystem.Person
Dim myPersonDetails As C2CSystem.PersonDetails = New C2CSystem.PersonDetails
myPersonDetails = obj.Login(txtEmail.Text, txtPwd.Text)
If myPersonDetails.PersonID <> 0 Then
Response.Cookies("email").Value = txtEmail.Text
Response.Cookies("GivenName").Value = myPersonDetails.GivenName
Response.Cookies("personid").Value = myPersonDetails.PersonID
Response.Redirect("MenuForRegisteredUsers.aspx")
Else
lblMsg.Text = "用户名或密码错误,请重试!"
End If
End If
End Sub
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -