net中登录页面的编码

net中登录页面的编码

本文介绍了ado.net中登录页面的编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要一个登录页面的编码页面或设计页面,在该页面中我们已经创建了数据库,或者我们已经想要在运行时登录时在数据库中插入了用户名或密码的值,因此必须在其中插入那些已经存在于数据库中的值

i want a coding or a design page for a login page in which where we are already make a database or we are already inserted the value of username or password in our database when we want to login in the runtime we have to inserted those value which are already in the database

推荐答案



Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
        con.Open()
        cmd = New SqlCommand("select * from login where username='" + UsernameTextBox.Text.ToString + "' and password='" + PasswordTextBox.Text.ToString + "'", con)
        dReader = cmd.ExecuteReader()
        If dReader.Read = True Then
            MDIParent1.Show()
            Me.Hide()
            con.Close()
        Else
            MsgBox("sorry")
        End If
        con.Close()
    End Sub



tryyyyyyyyyyy



tryyyyyyyyyyy it


这篇关于ado.net中登录页面的编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 23:09