User Login İşlemi

 

Merhaba arkadaşlar bu makalemizde veritabanı olmadan basit bir kullanıcı login işlemini gerçekleştireceğiz. Bunun için if else koşul ifadesini kullanacağız

 


 








Şekil 1





 








Şekil 2

 

Form1.vb

 

 

Public Class Form1

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

 

        Dim username As String

        Dim password As String

 

        username = TextBox1.Text

        password = TextBox2.Text

 

        If username = "admin" And password = "1234" Then

 

            MessageBox.Show("Login successful", "User Login", MessageBoxButtons.OK, MessageBoxIcon.Information)

 

        Else

 

            MessageBox.Show("Login failed!", "User Login", MessageBoxButtons.OK, MessageBoxIcon.Error)

 

        End If

    End Sub

End Class

  

Bir makalenin daha sonuna geldik. Bir sonraki makalede görüşmek üzere. Bahadır ŞAHİN

About Bahadır Şahin

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.

0 comments:

Öne Çıkan Yayın

GridView da Seçili Satırı DetailsView da Göstermek

Merhaba arkadaşlar bu makalemizde GridView nesnesi ile birlikte DetailsView nesanesini birlikte kullanacağız. GridView da seçili satırın de...