Severity Code Description Project File Line Suppression State
Error CS1061 'SignupScreen' does not contain a definition for 'BtnSubmit_Click' and no accessible extension method 'BtnSubmit_Click' accepting a first argument of type 'SignupScreen' could be found (are you missing a using directive or an assembly reference?) WpfSignupscreen D:\Visual Studio Work\WpfSignupscreen\WpfSignupscreen\SignupScreen.xaml 23 Active

`

 public partial class SignupScreen : Window
    {


        private void btnSubmit_Click(object sender, RoutedEventArgs e)



        {

            SqlConnection sqlCon = new SqlConnection(@"Data Source=DESKTOP-RV6MFQF; Initial Catalog=signupdb; Integrated Security=True;");
            try
            {
                if (sqlCon.State == ConnectionState.Closed)
                    sqlCon.Open();
                String query = "SELECT COUNT(1) FROM tblUser WHERE Username=@Username AND EmailAddress=@EmailAddress AND Password=@Password AND ReenterPassword=@ReenterPassword";
                SqlCommand sqlCmd = new SqlCommand(query, sqlCon);
                sqlCmd.CommandType = CommandType.Text;
                sqlCmd.Parameters.AddWithValue("@Username", txtUsername.Text);
                sqlCmd.Parameters.AddWithValue("@EmailAddress", txtEmailAddress.EmailAddress);
                sqlCmd.Parameters.AddWithValue("@Password", txtPassword.Password);



                int count = Convert.ToInt32(sqlCmd.ExecuteScalar());
                if (count == 1)
                {
                    MainWindow dashboard = new MainWindow();
                    dashboard.Show();
                    this.Close();
                }
                else
                {
                    MessageBox.Show("Username or email address or password or reenter password is incorrect.");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
                sqlCon.Close();
            }
        }

        private void btnSubmit_Click_1(object sender, RoutedEventArgs e)
        {

        }
    }

    internal class txtEmailAddress
    {
        internal static object EmailAddress;
    }
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.