如何验证数据库输入的用户名和密码? C# [英] How to verify inputted username and password against a database? C#

查看:260
本文介绍了如何验证数据库输入的用户名和密码? C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Windows窗体进行我的课程(不会实际使用,因此存储密码不是我担心的问题)而且我无法弄清楚如何检查用户说的是什么用户名+密码是针对我的数据库,它存储所有用户名+密码以查看他们是否真的是用户。



如何进行此操作?



我尝试过的事情:



我试过googling解决方案但我找不到任何东西(不使用asp.net等)或者太复杂了我无法理解和实现。

解决方案

看看这个: 密码存储:如何操作。 [ ^ ] - 它显示了一些(相对来说)简单的代码可能会有所帮助。


在C#~IT教程中试用这个简单Windows窗体登录应用程序示例 [ ^ ]

I'm doing my coursework using windows forms (not going to be actually used so storing passwords isn't an issue I'm worried about it) and I can't figure out how to check what a user has said their username+password is against my database which stores all the usernames+passwords to see if they're actually a user or not.

How do I go about doing this?

What I have tried:

I've tried googling solutions but nothing I can find applies to me (not using asp.net etc) or is too complex for me to understand and implement.

解决方案

Have a look at this: Password Storage: How to do it.[^] - it shows some (relatively simple) code which might help.


Try this Simple Windows Form Login Application in C# ~ IT Tutorials with Example[^]


这篇关于如何验证数据库输入的用户名和密码? C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆