protected void RegistrationMember(object sender, WizardNavigationEventArgs e)
        {
            TextBox txtID = (TextBox)cuwRegistration.FindControl("UserName");
            TextBox txtPass = (TextBox)cuwRegistration.FindControl("Password");
            TextBox txtEmail = (TextBox)cuwRegistration.FindControl("Email");
            TextBox txtQuestion = (TextBox)cuwRegistration.FindControl("Question");
            TextBox txtAnswer = (TextBox)cuwRegistration.FindControl("Answer");

            SqlConnection conRegister = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
            SqlCommand cmdRegister;
            conRegister.Open();
            cmdRegister = new SqlCommand("INSERT INTO [Member](UserName, Password, Email, Question, Answer) VALUES (@ID, @Pass, @Email, @Ques, @Ans)", conRegister);
            cmdRegister.Parameters.AddWithValue("@ID", txtID.Text);
            cmdRegister.Parameters.AddWithValue("@Pass", txtPass.Text);
            cmdRegister.Parameters.AddWithValue("@Email", txtEmail.Text);
            cmdRegister.Parameters.AddWithValue("@Ques", txtQuestion.Text);
            cmdRegister.Parameters.AddWithValue("@Ans", txtAnswer.Text);
            cmdRegister.ExecuteNonQuery();
            Roles.AddUserToRole(txtID.Text, "Member");
            conRegister.Close();
        }

Inside my own database database wasn't being insert, but in the ASP.Net Web Admin Tool was inserted and it doesn't no assign to any roles.

    <compilation debug="true" targetFramework="4.0" />
    <authentication mode="Forms" />
    <membership defaultProvider="MyMembershipProvider">
      <providers>
        <add name="MyMembershipProvider" type="System.Web.Security.SqlMembershipProvider" requiresQuestionAndAnswer="false" connectionStringName="connMSJ" />
      </providers>
    </membership>   

Problem Solved by adding these statement into the web.config

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.