I am working on an asp.net web application using VS2010 C#, which involves user registration and login. If the user while logging in, enters his password and attaches any number of white spaces in his password at the end, the application allows him to log in, irrespective of whether the password in the MS SQL SERVER database contains white spaces at the end or not. I want it to validate from the database the exact password user entered in the password field. Example: If in database password is saved as "mypass" and user enters password as "mypass " it allows login, and vice-versa.
I don't want to use trim because it will disallow the user to include white spaces in his password.
My password field is of the type: nvarchar(50)
Please help me with it..!