Making Sign up form using asp.net

I want that whenever the new user makes a sign up. C# code should check the value in database table whether the user with the same name exists or not . i am using sql-server for storing data and procedures to insert data. i am using a unique constraint in table and if the user with same name exists it should give a error message on the screen.