Designing a registration form, and I get this error when adding in MessageBoxButtons and MessageBoxIcon. The error is "argument 2: cannot convert 'system.windows.forms.Messageboxicon' to 'string'. The piece of code where the error is, is this: **
MessageBox.Show("You have successfully registered your account", MessageBoxIcon.Exclamation, MessageBoxButtons.OK);
** As well as here:
MessageBox.Show("Please fill in all of the boxes correctly", MessageBoxIcon.Exclamation, MessageBoxButtons.OK);
When I remove the Messageboxbutton/icon, there is no error. Here is what I have got:
{
MyConnections.insert.CommandText = "INSERT Customer(EmailAddress,Firstname,Surname,Password)VALUES('" + txtEmail.Text + "','" + txtFirst.Text + "','" + txtSur.Text + "','" + txtPassword.Text + "')";
MyConnections.insert.Connection = MyConnections.Customer;
MyConnections.Customer.Open();
MyConnections.insert.ExecuteNonQuery();
MyConnections.Customer.Close();
if (txtFirst.Text.Length > 0 && txtSur.Text.Length > 0 && txtEmail.Text.Length > 0 && txtPassword.Text.Length > 0 && txtConfirmPass.Text.Length > 0)
{
MessageBox.Show("You have successfully registered your account", MessageBoxIcon.Exclamation, MessageBoxButtons.OK);
}
else
{
MessageBox.Show("Please fill in all of the boxes correctly", MessageBoxIcon.Exclamation, MessageBoxButtons.OK);
}
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)