资源简介
asp.net access 注册 登陆实例
asp.net access 注册 登陆实例
asp.net access 注册 登陆实例
asp.net access 注册 登陆实例
代码片段和文件信息
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.OleDb;
using System.Text;
using System.Security.Cryptography;
public partial class log : System.Web.UI.Page
{
protected void Page_Load(object sender EventArgs e)
{
}
protected void btn登录_Click(object sender EventArgs e)
{
OleDbConnection con = new OleDbConnection(ConfigurationManager.AppSettings[“ConnectionString“]);
OleDbCommand com = new OleDbCommand(“select * from test where UserName=‘“ + txt用户名.Text.Trim()+“‘“ con);
con.Open();
OleDbDataReader dr = com.ExecuteReader();
if (dr.Read())
{
if (dr.GetString(2) == doEncrypt(txt密码.Text.Trim()))
{
Response.Write(“成功!“);
}
else
{
Response.Write(“失败!“);
}
}
}
//(a)
private string doEncrypt(string strPassWd)//698D51A19D8A121CE581499D7B701668
{
return System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(strPassWd “MD5“);
}
//(b)
//private string doEncrypt(string strPassWd)//浆䷽撣쟲⎄꩝⌧
//{
// //获取要加密的字段,并转化为Byte[]数组
// byte[] data = System.Text.Encoding.Unicode.GetBytes(strPassWd.ToCharArray());
// //建立加密服务
// System.Security.Cryptography.MD5 md5 = new System.Security.Cryptography.MD5CryptoServiceProvider();
// //加密Byte[]数组
// byte[] result = md5.ComputeHash(data);
// //将加密后的数组转化为字段
// string sResult = System.Text.Encoding.Unicode.GetString(result);
// //显示出来
// return sResult;
//}
//private string doEncrypt(string strPassWd)//6C-66-07-4F-9D-E5-06-6D-EF-C7-87-3C-D0-4D-B5-74
//{
// strPassWd = strPassWd.ToLower();
// Byte[] clearBytes = new UnicodeEncoding().GetBytes(strPassWd);
// Byte[] hashedBytes = ((HashAlgorithm)CryptoConfig.CreateFromName(“MD5“)).ComputeHash(clearBytes);
// return BitConverter.ToString(hashedBytes);
//}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 311296 2009-07-17 18:12 asp.net reg and login\App_Data\Databa
文件 850 2009-07-17 17:39 asp.net reg and login\log.aspx
文件 2449 2009-07-17 17:58 asp.net reg and login\log.aspx.cs
文件 954 2009-07-17 17:37 asp.net reg and login\reg.aspx
文件 2932 2009-07-17 17:58 asp.net reg and login\reg.aspx.cs
文件 3559 2009-07-17 16:52 asp.net reg and login\Web.config
目录 0 2009-07-17 18:12 asp.net reg and login\App_Data
目录 0 2009-07-17 17:58 asp.net reg and login
----------- --------- ---------- ----- ----
322040 8
相关资源
- Asp.net学生信息管理系统源码
- asp.net C#购物车源代码
- ASP.NET实验室预约管理系统
- 020ASP.NET车辆综合管理系统.zip
- c# 高校档案信息管理系统
- asp.net中c#做的躲避小游戏,希望大家
- ASP.NET C# 工资管理系统
- 一款漂亮的灯光闪烁的圣诞树(C# V
- ASP.NET客户管理系统(毕业设计 C#
- 在线求职系统(C#ASP.NET源码)
- 医院门诊管理系统 aspc#access数据库
- C#实现登录注册(SQL)
- asp.net 在线考试系统及论文
- 自适应企业网站模板源码响应式网站
- ASP.Net文件上传管理源码
- 《OA企业办公自动化》asp.net 源码(附
- 注册表操作大全
- asp.netc#开发规范
- asp.net 大文件上传(带进度条)
- 通过程序自动填充并提交ASP.NET表单(
- ASP.NET 基础编程文档(PPT电子教案)
-
ASP.NET_xm
l深入编程技术 - asp.net 新闻发布系统源码(附文档以及
- C#加密、安全与软件注册(9例).rar
- asp.net 简单的Ajax应用
- asp.net 企业官网源码(附数据库)
- C# Access版资产管理系统源代码
- asp.net 花语花店销售网站源码(含数据
- ASP.NET资产管理系统源码(附数据库)
- ajax 登录(基于asp.net)
川公网安备 51152502000135号
评论
共有 条评论