Imports System.Web.Security
Imports System.Text.RegularExpressions
Imports CharterDotCom.CommonEntities.Library
Imports CharterDotCom.CommonEntities.Library.Enumerations
Imports CharterDotCom.CommonEntities.Library.EntityMemberServices
Imports CharterDotCom.CommonEntities.Library.EntityEBSServices
Imports CharterDotCom.CommonEntities.Library.EntitySupport
Imports CharterDotCom.CommonEntities.Library.EntitySearch
Imports CharterDotCom.CommonEntities.Library.EntityWebConfig
Imports CharterDotCom.CommonEntities.Library.EntityG2BServices
Imports CharterDotCom.CommonEntities.Library.Common
Imports CharterDotCom.WebSite.Library
' Imports CharterDotCom.Common.Logging

Partial Class Controls_Login
    Inherits System.Web.UI.UserControl

    Private blnFailedAttemptLockout As Boolean

    Public strSectionTitle As String = "Login to My Account"
    Public strSectionTitleV3 As String = "My Account Login"

    Public Property Mode() As LoginMode
        Get
            If ViewState(Me.ID & "_Mode") Is Nothing Then
                Return LoginMode.Unspecified
            Else
                Return CType(ViewState(Me.ID & "_Mode"), LoginMode)
            End If
        End Get

        Set(ByVal value As LoginMode)
            ViewState(Me.ID & "_Mode") = value
        End Set
    End Property

    Public ReadOnly Property IsAuthor() As Boolean
        Get
            If Server.UrlDecode(Request.Url.Query).IndexOf("/Authors/") > -1 Then
                Return True
            Else
                Return False
            End If
        End Get
    End Property

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Me.pnlMyAccountV3.Visible = True
        Page_LoadV3()
    End Sub

    Protected Sub Page_LoadV3()
        lblStatusV3.Text = ""

        '###########################################################################
        'MODIFICATION   ROD COPELAND    ISSUE ID 4376   OCT 22 2008
        '########################################################################### 
        pnlZipVerificationV3.Visible = (Application("USE_ZIP_VERIFICATION") IsNot Nothing) _
            AndAlso _
            (Application("USE_ZIP_VERIFICATION").ToString().Trim().ToUpper() = "T")

        '#####################################################################
        '5/19/2008  ROD COPELAND
        'To show My account landing page directly if user is already authenticated
        'in different(CB or Charter) domain.
        '#####################################################################

        If (Not (Request.QueryString("un") Is Nothing)) AndAlso _
           (Not (Request.QueryString("pwd") Is Nothing)) Then
            SignIn(Request.QueryString("un").ToString().ToLower(), _
                   Request.QueryString("pwd").ToString(), _
                   chkHorWideRememberMe.Checked, _
                   Nothing)
        Else
            'THIS IS A NORMAL VALUE JUST SKIP AND ALLOW THE NORMAL LOGIN PAGE FLOW, NO PRE AUTHENTICATE STEP
        End If

        If Not IsPostBack Then
            If Request.Cookies(CookieName.m_UserName) Is Nothing Then
                txtHorUserName.Text = String.Empty
                txtVerUserName.Text = String.Empty
                txtHorWideUserName.Text = String.Empty
                chkVerRememberMe.Checked = False
                chkHorWideRememberMe.Checked = False
                txtMyAcctV3UserName.Text = String.Empty
                MyAcctV3Remember.Checked = False
                txtHorWideZipCodeV3.Text = String.Empty
            Else
                txtHorUserName.Text = Request.Cookies(CookieName.m_UserName).Value
                txtVerUserName.Text = Request.Cookies(CookieName.m_UserName).Value
                txtHorWideUserName.Text = Request.Cookies(CookieName.m_UserName).Value
                chkVerRememberMe.Checked = True
                chkHorWideRememberMe.Checked = True
                txtMyAcctV3UserName.Text = Request.Cookies(CookieName.m_UserName).Value

                'If a user already has the userName remembered but does not have the zipvalue was casuing an error. 
                ' as part of CL issue 99 Naqib.  
                If Not (Request.Cookies(CookieName.m_ZipCode)) Is Nothing Then
                    txtHorWideZipCodeV3.Text = Request.Cookies(CookieName.m_ZipCode).Value
                Else
                    Dim cookie As HttpCookie
                    cookie = New HttpCookie(CookieName.m_ZipCode, txtHorWideZipCodeV3.Text)
                    cookie.Expires = DateTime.Now.AddYears(1)
                    Response.Cookies.Add(cookie)
                End If

                MyAcctV3Remember.Checked = True
            End If
        End If

    End Sub

    Protected Sub Page_PreRenderV3()
        '#####################################################################
        '6/21/2007  ROD COPELAND
        'LOCKOUT THE USER IF THEY HAVE FAILED TOO MANY TIMES FOR THIS SESSION.
        '#####################################################################
        'JPIRKEY/SKANURI 4-2010 Moved the EvaluationFailedAttemptLockout to a central location
        blnFailedAttemptLockout = Utilities.LoginHandler.EvaluateFailedAttemptLockout(Me.Context, "MyAccount_Login")
        pnlVertical.Visible = False
        pnlHorizontal.Visible = False
        pnlHorizontalWide.Visible = False
        pnlHeaderLoginDrop.Visible = False  'Naqib Oct 16 2008 
        pnlMyAccountV3.Visible = False  'v3

        If blnFailedAttemptLockout Then
            btnLogin.Visible = False
            strSectionTitle = "Login Failed"
            pnlAttemptLimitReached.Visible = True
        Else
            btnLogin.Visible = True
            strSectionTitle = "Login to My Account"
            pnlAttemptLimitReached.Visible = False

            Select Case Mode
                Case LoginMode.HeaderDrop   'Naqib Oct 16 2008
                    pnlHeaderLoginDrop.Visible = True
                Case LoginMode.Vertical
                    pnlVertical.Visible = True
                Case LoginMode.Horizontal
                    pnlHorizontal.Visible = True
                Case LoginMode.HorizontalWide
                    pnlHorizontalWide.Visible = True
                    txtHorWideUserName.Focus()
                Case LoginMode.MyAccountV3
                    Me.pnlMyAccountV3.Visible = True
                    Me.txtMyAcctV3UserName.Focus()
            End Select
        End If

        If pnlAttemptLimitReached.Visible Then
            Dim cTxt As String = ContentManager.Instance.GetContent("myaccount:login:exceededMaxTry", "1", OwnerType.Other)
            cTxt = cTxt.Replace("{{MYACCOUNT_LOGIN_FAILED_ATTEMPT_MAX_COUNT}}", Application("MYACCOUNT_LOGIN_FAILED_ATTEMPT_MAX_COUNT"))
            pnlAttemptLimitReachedCustomContent.Text = cTxt.ToString()
        End If

        '###############################################################
        'MODIFICATION   ROD COPELAND   05/08/2008
        '###############################################################
        'THIS CONDITION IS USED TO DISABLE THE MYACCOUNT SECTION OF THE 
        'SITE TO FROM BEING USED WHILE THE ISP RELEASE IS BEING DONE, 
        'WE DONT WANT PEOPLE TRYING TO LOGIN WITH ERRORS SINCE THE CORE 
        'OF THE MS AREA IS BEING CHANGED OUT.  WHILE HIDING THE LOGIN 
        'CONTROLS, WE CAN SHOW A PAGE THAT EXPLAINS WE ARE DOING SOME 
        'MAINTANENCE RIGHT NOW AND SERVICES WILL BE TEMPORARILY 
        'UNAVAILABLE AND TO PLEASE CHECK BACK IN A FEW HOURS.
        '###############################################################
        ltrMessages.Text = ""
        Dim blnDisableMyAccountLogin As String = Application("DISABLE_CHARTERDOTCOM_MYACCOUNT_LOGIN")

        ' Logger.WebLog("\UI\Controls\Login\Page_PreRenderV3")

        If Not (blnDisableMyAccountLogin Is Nothing) Then
            Select Case blnDisableMyAccountLogin.Trim().ToUpper()
                Case "T"
                    '############################
                    'DISABLE THE LOGIN PAGE
                    '############################
                    btnLogin.Visible = False
                    strSectionTitle = "My Account Availability Status"
                    pnlVertical.Visible = False
                    pnlHorizontal.Visible = False
                    pnlHorizontalWide.Visible = False
                    pnlAttemptLimitReached.Visible = False

                    pnlMyAccountV3.Visible = False 'v3
                    pnlHeaderLoginDrop.Visible = False  'Naqib Oct 16 2008

                    ltrMessages.Text = ContentManager.Instance.GetContent("myaccount:login:unavailable", "1", OwnerType.Other)
                    pnlMSLoginIsUnavailable.Visible = True
                Case Else
                    '############################
                    'DONT DISABLE THE LOGIN PAGE
                    '############################
                    pnlMSLoginIsUnavailable.Visible = False
            End Select
        End If

    End Sub

    Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
        Page_PreRenderV3()
    End Sub

    Protected Sub btnHeaderLogin_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnHeaderLogin.Click
        txtHorWideUserName.Text = txtHeaderLoginDropUserName.Text
        txtHorWidePassword.Text = txtHeaderLoginPass.Text
        chkHorWideRememberMe.Checked = True
        SignIn(txtHeaderLoginDropUserName.Text.ToLower(), txtHeaderLoginPass.Text, chkHorWideRememberMe.Checked, Nothing)
    End Sub

    Protected Sub btnHorLogin_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnHorLogin.Click
        SignIn(txtHorUserName.Text.ToLower(), txtHorPassword.Text, False, vldHorLoginCustom)
    End Sub

    Protected Sub btnVerLogin_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnVerLogin.Click
        SignIn(txtVerUserName.Text.ToLower(), txtVerPassword.Text, chkVerRememberMe.Checked, vldVerLoginCustom)
    End Sub

    Protected Sub btnHorWideLogin_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnHorWideLogin.Click
        SignIn(txtHorWideUserName.Text.ToLower(), txtHorWidePassword.Text, chkHorWideRememberMe.Checked, Nothing)
    End Sub

    Protected Sub btnMyAcctV3_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnMyAcctV3.Click
        txtHorWideUserName.Text = txtMyAcctV3UserName.Text
        txtHorWidePassword.Text = txtMyAcctV3Pass.Text
        chkHorWideRememberMe.Checked = MyAcctV3Remember.Checked

        SignIn(txtMyAcctV3UserName.Text.ToLower(), txtHorWideZipCodeV3.Text, txtMyAcctV3Pass.Text, MyAcctV3Remember.Checked, Nothing)
    End Sub

    Protected Sub btnRegister_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnRegister.Click
        '11/6/2007 Brad Miller - Added for CPNI
        If Page.IsValid Then
            '##################################################################################
            'M O D I F I C A T I O N    MARK SNYDER   6/13/2008
            '##################################################################################
            'ADDED CALL TO CPNI VERIFICATION TO ENSURE SECURITY CODE AND ACCOUNT NUMBER MATCH
            'BEFORE PROCEEDING.
            '##################################################################################
            Dim _successCPNI As Boolean = False
            _successCPNI = AccountManager.Instance.GetCPNIVerification(txtHorWideAccountNumber.Text, txtHorWideSecurityCode.Text)

            If _successCPNI Then
                Server.Transfer("register.aspx")
            Else
                '##################################################################################
                'M O D I F I C A T I O N    MARK SNYDER   6/13/2008
                '##################################################################################
                'ADDED ROD'S ERROR CODE MAPPING SOLUTION FOR HANDLING AN UNSUCCESSFUL CALL TO THE 
                'CPNI VERIFICATION.
                '##################################################################################
                '##################################################################################
                '##########     E R R O R   C O D E   M A P P I N G    S O L U T I O N      #######
                '#################          MODIFIED BY ROD COPELAND, 5/2/2007     ################ 
                '##################################################################################
                'WRITE THE (IDEALLY) CHARTER FRIENDLY ERROR MESSAGES TO THE PAGE.  
                'THESE MESSAGES ARE MANAGED IN THE CHARTERDOTCOM.ADMIN.ERROR_CODE_MAPPING TABLE.
                'THE UNDERLYING LOGIC WILL DISPLAY THE DATASOURCE ERROR MESSAGE IF A 
                'CHARTERDOTCOM FRIENDLY ERROR MESSAGE IS NOT PRESENT ON THE RECORD.
                'THERE MAY BE MORE THAN ONE ERROR MESSAGE THAT COMES BACK, DISPLAY 
                'ACCORDINGLY.
                '##################################################################################
                Dim i As Integer
                For i = 0 To Page.Validators.Count - 1
                    If CType(Page.Validators(i), Control).ID = "rfvAccountNumber" Then
                        Exit For
                    End If
                Next
                Select Case True
                    Case Not AccountManager.Instance.GetLastCCOMDisplayFriendlyExceptionMessage Is Nothing
                        Page.Validators(i).ErrorMessage = AccountManager.Instance.GetLastCCOMDisplayFriendlyExceptionMessage
                        Page.Validators(i).IsValid = False
                        AccountManager.Instance.ClearCCOMDisplayFriendlyExceptionMessage()
                    Case Else
                        Page.Validators(i).ErrorMessage = "The account number and security code combination you entered cannot be validated."
                        Page.Validators(i).IsValid = False
                End Select
            End If
        End If
    End Sub

    Private Function ValidateUsername(ByVal strTemp As String) As Boolean
        Dim strRegExp As String = ""

        If strTemp IsNot Nothing Then
            strRegExp = "^[a-zA-Z0-9._-]+$"
            Return Regex.IsMatch(strTemp, strRegExp)
        Else
            Return True
        End If

    End Function

    Private Function ValidatePassword(ByVal strTemp As String) As Boolean
        If strTemp IsNot Nothing Then
            If strTemp.IndexOf("\") > 0 OrElse strTemp.IndexOf("""") > 0 Then
                Return False
            Else
                Return True
            End If
        End If

    End Function

    '#####################################################################
    '5/19/2008  ROD COPELAND
    'If the user is not in the correct domain,
    'below function redirects the user an appropriate domain MyAccount Page 
    '#####################################################################

    Private Sub SignIn(ByVal userName As String, _
                       ByVal zipCode As String, _
                       ByVal password As String, _
                       ByVal rememberMe As Boolean, _
                       ByVal validator As CustomValidator)

        Dim blnFlag As Boolean = False

        If Not (Request.QueryString("un") Is Nothing) Then
            If Not (Request.QueryString("pwd") Is Nothing) Then
                '###########################################################################
                'MODIFICATION   ROD COPELAND    ISSUE ID 4376   OCT 22 2008
                '########################################################################### 
                If Not (Application("USE_ZIP_VERIFICATION") Is Nothing) Then
                    If Application("USE_ZIP_VERIFICATION").ToString().Trim().ToUpper() = "T" Then
                        If Not (Request.QueryString("zip") Is Nothing) Then
                            blnFlag = True
                        Else
                            blnFlag = False
                        End If
                    Else
                        blnFlag = True
                    End If
                Else
                    blnFlag = True
                End If
            Else
                blnFlag = False
            End If
        Else
            blnFlag = False
        End If

        '#####################################################################
        '6/21/2007  ROD COPELAND
        'LOCKOUT THE USER IF THEY HAVE FAILED TOO MANY TIMES FOR THIS SESSION.
        '#####################################################################
        'JPIRKEY/SKANURI 4-2010 Moved the EvaluationFailedAttemptLockout to a central location
        blnFailedAttemptLockout = Utilities.LoginHandler.EvaluateFailedAttemptLockout(Me.Context, "MyAccount_Login")

        If Not blnFailedAttemptLockout Then
            If Not (blnFlag) Then
                If Page.IsValid Then
                    If txtHorWideUserName.Text.Trim().Length = 0 Or txtHorWidePassword.Text.Trim().Length = 0 Or txtMyAcctV3UserName.Text.Trim().Length = 0 Then
                        If LoginMode.MyAccountV3 Then
                            lblStatusV3.Text = "<div class=""ValidationSummary"">" & _
                                "<img src='../Images/error-icon_small.ccom' /><b>Username</b> and <b>Password</b> are required." & _
                                "</div>"
                        Else
                            lblStatus.Text = "<img src='../Images/error-icon_small.ccom' /><b>Username</b> and <b>Password</b> are required."
                        End If
                        blnFlag = False
                    Else
                        blnFlag = True
                    End If
                Else
                    blnFlag = True
                End If
            End If
            If (blnFlag) Then
                '###########################################################################
                'MODIFICATION   ROD COPELAND    ISSUE ID 4376   OCT 22 2008
                '########################################################################### 
                Dim blSignInResult As Boolean = False

                '***************************************
                'JPirkey 4-2010 MyAccount Feature Update
                '***************************************
                'All login-related code was moved to a central location and is no longer duplicated between these 2 SignIn
                'routines - nor the RetrieveUsername.aspx workflow.
                blSignInResult = Utilities.LoginHandler.Login(Me.Context, rememberMe, userName, password, txtHorWideZipCodeV3.Text, validator, IsAuthor)
                If Not blSignInResult Then
                    '##################################################################################
                    '##########     E R R O R   C O D E   M A P P I N G    S O L U T I O N      #######
                    '#################          MODIFIED BY ROD COPELAND, 5/2/2007     ################ 
                    '##################################################################################
                    'WRITE THE (IDEALLY) CHARTER FRIENDLY ERROR MESSAGES TO THE PAGE.  
                    'THESE MESSAGES ARE MANAGED IN THE CHARTERDOTCOM.ADMIN.ERROR_CODE_MAPPING TABLE.
                    'THE UNDERLYING LOGIC WILL DISPLAY THE DATASOURCE ERROR MESSAGE IF A 
                    'CHARTERDOTCOM FRIENDLY ERROR MESSAGE IS NOT PRESENT ON THE RECORD.
                    'THERE MAY BE MORE THAN ONE ERROR MESSAGE THAT COMES BACK, DISPLAY 
                    'ACCORDINGLY.
                    '##################################################################################
                    Select Case True
                        Case Not AccountManager.Instance.GetLastCCOMDisplayFriendlyExceptionMessage Is Nothing
                            If LoginMode.MyAccountV3 Then
                                lblStatusV3.Text = "<div class=""ValidationSummary"">" & "<img src='../Images/error-icon_small.ccom' /> " & AccountManager.Instance.GetLastCCOMDisplayFriendlyExceptionMessage & "</div>"
                            Else
                                lblStatus.Text = "<img src='../Images/error-icon_small.ccom' />" & AccountManager.Instance.GetLastCCOMDisplayFriendlyExceptionMessage
                            End If
                            AccountManager.Instance.ClearCCOMDisplayFriendlyExceptionMessage()
                        Case Else
                            If LoginMode.MyAccountV3 Then
                                lblStatusV3.Text = "<div class=""ValidationSummary"">" & "<img src='../Images/error-icon_small.ccom' /> Sorry, we're unable to take your request at this time." & "</div>"
                            Else
                                lblStatus.Text = "<img src='../Images/error-icon_small.ccom' />Sorry, we're unable to take your request at this time."
                            End If

                    End Select

                    If Not (validator Is Nothing) Then
                        validator.IsValid = False
                    End If

                End If
            End If
        End If
    End Sub

    Private Sub SignIn(ByVal userName As String, ByVal password As String, ByVal rememberMe As Boolean, ByVal validator As CustomValidator)
        Dim blnFlag As Boolean = False

        If Not (Request.QueryString("un") Is Nothing) Then
            If Not (Request.QueryString("pwd") Is Nothing) Then
                '###########################################################################
                'MODIFICATION   ROD COPELAND    ISSUE ID 4376   OCT 22 2008
                '########################################################################### 
                If Not (Application("USE_ZIP_VERIFICATION") Is Nothing) Then
                    If Application("USE_ZIP_VERIFICATION").ToString().Trim().ToUpper() = "T" Then
                        If Not (Request.QueryString("zip") Is Nothing) Then
                            blnFlag = True
                        Else
                            blnFlag = False
                        End If
                    Else
                        blnFlag = True
                    End If
                Else
                    blnFlag = True
                End If
            Else
                blnFlag = False
            End If
        Else
            blnFlag = False
        End If

        '#####################################################################
        '6/21/2007  ROD COPELAND
        'LOCKOUT THE USER IF THEY HAVE FAILED TOO MANY TIMES FOR THIS SESSION.
        '#####################################################################
        blnFailedAttemptLockout = Utilities.LoginHandler.EvaluateFailedAttemptLockout(Me.Context, "MyAccount_Login")

        If Not blnFailedAttemptLockout Then
            If Not (blnFlag) Then
                If Page.IsValid Then
                    If txtHorWideUserName.Text.Trim().Length = 0 OrElse _
                       txtHorWidePassword.Text.Trim().Length = 0 OrElse _
                       txtMyAcctV3UserName.Text.Trim().Length = 0 Then
                        If LoginMode.MyAccountV3 Then
                            lblStatusV3.Text = "<div class=""ValidationSummary"">" & "<img src='../Images/error-icon_small.ccom' /><b>Username</b> and <b>Password</b> are required." & "</div>"
                        Else
                            lblStatus.Text = "<img src='../Images/error-icon_small.ccom' /><b>Username</b> and <b>Password</b> are required."
                        End If
                        blnFlag = False
                    Else
                        blnFlag = True
                    End If
                Else
                    blnFlag = True
                End If
            End If
            If (blnFlag) Then
                '###########################################################################
                'MODIFICATION   ROD COPELAND    ISSUE ID 4376   OCT 22 2008
                '########################################################################### 
                Dim blSignInResult As Boolean = False

                '***************************************
                'JPirkey 4-2010 MyAccount Feature Update
                '***************************************
                'All login-related code was moved to a central location and is no longer duplicated between these 2 SignIn
                'routines - nor the RetrieveUsername.aspx workflow.
                blSignInResult = Utilities.LoginHandler.Login(Me.Context, rememberMe, _
                                            userName, password, _
                                            txtHorWideZipCodeV3.Text, validator, IsAuthor)
                If Not blSignInResult Then
                    '##################################################################################
                    '##########     E R R O R   C O D E   M A P P I N G    S O L U T I O N      #######
                    '#################          MODIFIED BY ROD COPELAND, 5/2/2007     ################ 
                    '##################################################################################
                    'WRITE THE (IDEALLY) CHARTER FRIENDLY ERROR MESSAGES TO THE PAGE.  
                    'THESE MESSAGES ARE MANAGED IN THE CHARTERDOTCOM.ADMIN.ERROR_CODE_MAPPING TABLE.
                    'THE UNDERLYING LOGIC WILL DISPLAY THE DATASOURCE ERROR MESSAGE IF A 
                    'CHARTERDOTCOM FRIENDLY ERROR MESSAGE IS NOT PRESENT ON THE RECORD.
                    'THERE MAY BE MORE THAN ONE ERROR MESSAGE THAT COMES BACK, DISPLAY 
                    'ACCORDINGLY.
                    '##################################################################################
                    Select Case True
                        Case Not AccountManager.Instance.GetLastCCOMDisplayFriendlyExceptionMessage Is Nothing
                            If LoginMode.MyAccountV3 Then
                                lblStatusV3.Text = "<div class=""ValidationSummary"">" & _
                                    "<img src='../Images/error-icon_small.ccom' /> " & _
                                    AccountManager.Instance.GetLastCCOMDisplayFriendlyExceptionMessage & _
                                    "</div>"
                            Else
                                lblStatus.Text = "<img src='../Images/error-icon_small.ccom' />" & _
                                    AccountManager.Instance.GetLastCCOMDisplayFriendlyExceptionMessage
                            End If
                            AccountManager.Instance.ClearCCOMDisplayFriendlyExceptionMessage()
                        Case Else
                            If LoginMode.MyAccountV3 Then
                                lblStatusV3.Text = "<div class=""ValidationSummary"">" & _
                                    "<img src='../Images/error-icon_small.ccom' /> Sorry, we're unable to take your request at this time." & _
                                    "</div>"
                            Else
                                lblStatus.Text = "<img src='../Images/error-icon_small.ccom' />Sorry, we're unable to take your request at this time."
                            End If

                    End Select

                    If Not (validator Is Nothing) Then
                        validator.IsValid = False
                    End If

                End If
            End If
        End If
    End Sub

    Protected Sub btnLogin_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnLogin.Click
        Response.Redirect("../Order/Login.aspx")
    End Sub
End Class