default.aspx.vb

来自「这是一个订单管理系统」· VB 代码 · 共 38 行

VB
38
字号
Imports OrderDll
Imports System.Data
Imports System.Web


Partial Class _Default
    Inherits System.Web.UI.Page
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Page_Init()
    End Sub

    Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) Handles Login1.Authenticate
        Dim strUID As String
        Dim strPwd As String
        Dim strPri As String = ""
        Dim boolLogin As Boolean
        strUID = Login1.UserName.Replace("'", "''")
        strPwd = Login1.Password.Replace("'", "''")
        boolLogin = ClassCommon.CheckLogin(strUID, strPwd, strPri)
        If boolLogin = True Then
            System.Web.HttpContext.Current.Session("USERID") = Login1.UserName
            System.Web.HttpContext.Current.Session("PRIVILEGE") = strPri
            Me.Response.Redirect("Index.htm")
        Else

        End If


    End Sub

    Protected Sub Page_Init()
        Login1.Height = 180
        Login1.Width = 600
        Login1.UserNameLabelText = "User ID"
        Login1.PasswordLabelText = "Password"
    End Sub
End Class

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?