I want to validate my username and Password..I have tried out all but nothing worked out..I dunno where am i going wrong..Pls help..
Thanks in advance..
I have created a stored procedure in SQL server
CREATE PROC Website
(@Username NVARCHAR,@Password NVARCHAR,@Outres INT)
AS
BEGIN
SET @Outres=(Select (*) From Tablename where
Username=@Username and Password=@password)
END
and In c# i have called it as
Sqlconnection con=new Sqlconnection(Connection String);
con.open();
Sqlcommand cmd=new Sqlcommand("Website2",con);
cmd.commandtype=CommandType.StoredProcedure;
cmd.Parameters.Add("@Username",SqlDBType.Nvarchar).Value=Uname.Text;
cmd.Parameters.Add("@Password",SqlDbType.Nvarchar).Value=Pwd.Text;
cmd.Parameters.Add("@Outres",SqlDbType.Int);< ...
Go to the complete details ...