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

Reading number is top 10 articles
ASP.NET效率陷阱之——Attributes_[Asp.Net教程]
asp.net2.0网站语法之Web.config文件配置
C#根据条件搜索Infopath生成的XML数据_.net资料_编程技术
windows下Apache2+php4+MySql5集成简明教程_[PHP教程]
C#中TextBox控件应用实例
C#文件处理技术:FileInfo和DirectoryInfo
ASP.NET(C#)经典采集代码_[Asp.Net教程]
C#教程:保护注册表
ASP.NET,2.0+Atlas编写鼠标拖放程序_.net资料_编程技术
用于自动添加Digg,This!按钮的javascript_JavaScript技术_编程技术
Reading number is top 10 pictures
Fierce! China's special forces training the devil1
西游四格漫画(二)
A resort photographed beautiful young woman change clothes process vomiting blood2
做运动的校花1
看如何给单纯的少女洗脑
Average female college students2
Take you to walk into the most true north Korea rural4
男人巳快沦落成动物了
HongMenYan premiere XinLiangGong clairvoyant outfit PK YiFeiLiu2
So beauty, will let you spray blood5
Download software ranking
Tram sex maniac 2 (H) rar bag5
Boxer's Top ten classic battle9
中国结婚习俗实录
Unix video tutorial9
Boxer vs Yellow3
C#COM编程指南
Unix video tutorial18
虚拟机汉化软件
传奇私服架设教程
Unix video tutorial11
归海一刀 published in(发表于) 2014/1/30 1:19:42 Edit(编辑)
asp.net使用存储过程实现用户登录_[Asp.Net教程]

asp.net使用存储过程实现用户登录_[Asp.Net教程]

asp.net使用存储过程实现用户登录_[Asp.Net教程]

cs代码如下

string UserName = txtUserName.Text.ToString();
string PassWord = txtPassWord.Text.ToString();
PassWord = FormsAuthentication.HashPasswordForStoringInConfigFile(PassWord, "md5").ToLower().Substring(8, 16);
SqlParameter[] par = new SqlParameter[3];
par[0] = new SqlParameter("@username", SqlDbType.VarChar, 50);
par[0].Value = UserName;
par[1] = new SqlParameter("@password",SqlDbType.VarChar,50);
par[1].Value = PassWord;
par[2] = new SqlParameter("@userreturn", SqlDbType.Int, 4) ;
par[2].Direction = ParameterDirection.Output;
SqlDataReader sdr = SqlHelper.ExecuteReader(SqlHelper.sqlstring, CommandType.StoredProcedure, "User_Login",par);
int fhz = Convert.ToInt32(par[2].Value);
Label1.Text =fhz.ToString(); //这里作一下判断就好了


存储过程如下:


Create PROCEDURE User_Login
@username varchar(50),
@password varchar(50),
@userreturn BIT OUTPUT
AS
DECLARE @strPwd NVARCHAR(20)
select @strPwd=***_pass_word from fs_mf_*** where ***_name=@username
IF @password=@strPwd
SET @userreturn=1
ELSE
SET @userreturn=0
GO




添加到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.