我们如何创建自动生成的密码和用户名 [英] how can we create a autogenerated password and username

查看:83
本文介绍了我们如何创建自动生成的密码和用户名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何生成自动生成的用户名和d密码,然后在单击邮件时将其发送到emai id.我们如何为其编写程序

how can we generate a autogenerated username an d password and send it to a emai id on a button click of mail .how can we write a procedure for it

推荐答案

string auto_pwd = System.Guid.NewGuid().ToString().Substring(0,10);
            cmd_insertuserDetail.Parameters.Add(new SqlParameter("@password", auto_pwd));



这用于生成密码
并且您需要在数据库中查找用户名,该用户名可用,然后将其保存为新的用户名和密码.


然后使用用于通过gmail用户ID和密码发送邮件的代码.

因为它是免费的.



this is used for password generation
and you need to chek for username in database and which is available then save it into new user id and password .


then use code for sending mail using gmail user id and password.

because it is free.


这篇关于我们如何创建自动生成的密码和用户名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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