its simple dude...
you have to create a stored procedure which retuns userid on passing username & password.
For example.ul.Check_Admin_Login(); is a function which authenticate login process and redirect the response.
ul.pwd = txt_pwd.Text;
int chk = ul.Check_Admin_Login();
userInfo_class.unm = txt_unm.Text.Trim().ToString();
ul.pwd = txt_pwd.Text.Trim().ToString();
userInfo_class.unm = Convert.ToString(ul.Chk_Login());
Session.Add("uid", userInfo_class.unm);
if (userInfo_class.unm != "0")
{
Response.Redirect("Welcome.aspx");
}
else
{
lbl_message.Text = "Invalid User.";
txt_unm.Text = "";
}
}