SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\NANO\Documents\nan.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True");
SqlDataAdapter sda = new SqlDataAdapter("select count(*) from registration where name ='" + textBox1.Text + "' and password= '" + textBox2.Text + "'", con);
DataTable dt = new DataTable();
sda.Fill(dt);
if (dt.Rows[0][0].ToString() == "1")
{
this.Hide();
wlcm ww = new wlcm(textBox1.Text);<pre lang="c#">
ww.Show();
}
else
{
MessageBox.Show("please check your user id or password");
}
this is my code for login id and password, i have stored account tpye is registartion table in that table column name is actype...
help me for doing login with user id , pasword and account type, is admin or user