📄 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 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
'Put user code to initialize the page here
If Page.IsValid = True Then
Dim obj As Bid.Person = New Bid.Person()
Dim myPersonDetails As Bid.PersonDetails = New Bid.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 = "Login failed. Please try again."
End If
End If
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -