IF You want to insert specific columns data only then you have to write it also in query like that...
SqlCommand cmd = new SqlCommand("insert into login (Username, Password) values (@UserName,@Password)", con);
cmd.Parameters.AddWithValue("@UserName", txtUserName.Text);
cmd.Parameters.AddWithValue("@Password", txtPassword.Text);