CREATE New User Account to LOGIN WINDOW in dot net




This is a C# Practice code:
      using System;
      using System.Collections.Generic;
      using System.ComponentModel;
      using System.Data;
      using System.Drawing;
      using System.Linq;
      using System.Text;
      using System.Windows.Forms;
      using System.Data.SqlClient;
      using System.Security.Cryptography;

      namespace dataentry
      {
          public partial class NewUser : Form
          {
              public NewUser()
              {
                  InitializeComponent();
                  algor = Rijndael.Create();
              }

              private void button11_Click(object sender, EventArgs e)
              {
                  this.Hide();
                  //Form1 F1 = new Form1();
                  //F1.Show();
              }
              SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=dataentry;Integrated Security=True;Pooling=False");
              private void button10_Click(object sender, EventArgs e)
              {
                  if (textBox2.Text == textBox3.Text)
                  {
                      SqlDataAdapter asdf = new SqlDataAdapter("insert into LOGINWINDOW (username,pass) values('" + textBox1.Text + "','" + textBox2.Text + "') ", con);
                      DataTable ss = new DataTable();
                      asdf.Fill(ss);
                      MessageBox.Show("YOUR Account Created....!!");

                  }
                  else
                  {
                      MessageBox.Show("Password and Confirm Password Mismatch..!!");
                  }
              }

Vedio For Result:

Share on Google Plus

About Unknown

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Facebook Comment