Friday 31 August 2012

Login form validation in vb.net using username and password field

Onbutton_click()
{
If (UsernameTextBox.Text = "" And PasswordTextBox.Text = "") Then
            MsgBox("Enter username & password")
        Else

            If (UsernameTextBox.Text = "") Then
                MsgBox("Enter username")
            Else
                If (PasswordTextBox.Text = "") Then
                    MsgBox("Enter password")
                Else
                    If (UsernameTextBox.Text = "scott" And PasswordTextBox.Text = "tiger") Then
                        ProgressBar1.Visible = True
                        ProgressBar1.Value = 0
                        Dim i As Integer = 100000
                        While (i >= ProgressBar1.Value)
                            ProgressBar1.Value = ProgressBar1.Value + 10
                        End While
                        Form1.Show()
                        Me.Hide()

                    Else
                        MsgBox("Enter correct username & password")
                    End If
}
Share This
Previous Post
Next Post

FYJC XI standard online admisson Process and declaraton of Merit list . Cut off List For prevous year also . 10 Th Results onlne declaraton Maharashtra Region .

0 comments: