DB にデータベースが存在するかどうかを確認する if else ステートメントを作成しましたが、ASP は確認しませんか?
私はこれを間違っていると思います。
これは私のコードです...
SqlCommand check = new SqlCommand("SELECT Count(*) FROM [Users] WHERE Username='" + @username + "'", Connect);
int exist = check.ExecuteNonQuery();
if (exist > 0)
{
txtuser.Text = "User already exists";
} else
// Insert the non-existing data to database