All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
ASP.NET,2.0防止同一用户同时登陆_[Asp.Net教程]
在ADO.NET中用参数化查询缩短开发时间_.net资料_编程技术
简述.net编程中容易出现的错误认识_[Asp.Net教程]
.NET2.0在Repeater中实现删除_[Asp.Net教程]
C#,3.0新特征之创建和初始化集合对象_[Asp.Net教程]
PHP实现简单线性回归之数学库的重要性_[PHP教程]
简单介绍,ASP.NET,中的运算操作符_.net资料_编程技术
怎样才能成为PHP高手?学会“懒惰”的编程_php资料_编程技术
PHP实例:从数组里筛选出重复的数据_php资料_编程技术
使用PHP,5.0,轻松解析XML文档_php资料_编程技术
Reading number is top 10 pictures
Discharge accidentally Actresses by the breast1
鸡也看毛片
The money of more than 100 countries and regions18
大四女生借债隆胸成功
Take you to walk into the most true north Korea rural4
Startling Russian girl blind date scene1
如果没有好报,为什么要做好人?
Look for from human art net, is good1
Chinese paper-cut grilles art appreciation1
Female model behind the bitterness, often being overcharged3
Download software ranking
仙剑奇侠传98硬盘WINXP版
电车之狼R
终极变速大师Speeder3.26
Unix video tutorial4
Tram sex maniac 2 (H) rar bag15
在线棋牌游戏3.05版
Tram sex maniac 2 (H) rar bag13
C#与.NET技术平台实战演练
Tram sex maniac 2 (H) rar bag1
Ashlynn Video4
delv published in(发表于) 2014/1/8 7:01:57 Edit(编辑)
ASP.NET中散列加密密码_[Asp.Net教程]

ASP.NET中散列加密密码_[Asp.Net教程]

ASP.NET中散列加密密码_[Asp.Net教程]

private void LoginButton_Click(object sender,System.EventArgs e)
{
String sql=String.Format("select password from Administrator where AdminID='{0}',UseridBox.Text);
SqlConnection conn=new SqlConnection(ConfigurationSettings.AppSettings["connectionString"]);
SqlDataReader myreader=new SqlCommand(sql,conn).ExecuteReader();
if(myreader.Read())
{
String hashed=FormsAuthentication.HashPasswordForStoringInConfigFile(PasswordTextBox.Text,"SHA1");
//将用户输入的密码哈希后再与数据库是的哈希值进行比较
if(hash==myreader["password"]).ToString())
{
FormsAuthentication.RedirectFromLoginPage(UseridBox.Text,true);//转到请求页
}
else
Result.Text="密码错误";
}
else
Result.Text="用户不存在";
conn.Close();
}


来源:网络







添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.