DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter("select * from Admin_Login where username ='" + txtusername.Text + "' and password='" + txtpassword.Text + "'", sconn);
da.Fill(ds);
int count = ds.Tables[0].Rows.Count;
if (count == 0)
{
MessageBox.Show("Wrong username or password");
txtusername.Focus();
}
else
{
successpage pg= new successpage ();
pg.Show();
this.Hide();
}
sconn.Close();