SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Connection"].ToString());
con.Open();
query = "EmpLogin";
SqlCommand cmd = new SqlCommand(query,con);
cmd.CommandType = CommandType.Text;
cmd.Parameters.AddWithValue("@UserName", txtUserName.Text.ToString());
cmd.Parameters.AddWithValue("@Password", txtPassword.Text.ToString());
int usercount = (Int32)cmd.ExecuteScalar();