Start by changing the way you handle passwords: that is very insecure. Never store passwords in clear text - it is a major security risk. There is some information on how to do it here:
Password Storage: How to do it.[
^]
Secondly, never try to insert values without specifying column names:
INSERT INTO MyTable (MyColumn1, MyColumn2) VALUES (@C1, @c2)
If you change your DB you may insert the wrong values to the wrong columns unless you specify the order. In addition, if your table starts with an IDENTITY column - which many do, and for good reason - the INSERT will fail as SQL tries to insert them in order and you can't write to an IDENTITY field. (If you aren't using a separate ID field, it's a very good idea to do so: that way the user can change his name without you having to update all the other records, and it's a lot more efficient to use an INT or GUID as a foreign key than a string)
Then, don't just try to insert the value: check if the username is in use by asking SQL:
using (SqlConnection con = new SqlConnection(strConnect))
{
con.Open();
using (SqlCommand cmd = new SqlCommand("SELECT COUNT(*) FROM myTable WHERE UserName = @UN", con))
{
cmd.Parameters.AddWithValue("@UN", UserName.Text);
int users = cmd.ExecuteScalar();
if (users != 0)
{
...
}
else
{
...
}
}
}