I think its easy to edit the Java Script at client side and bypass the validation.
again CompareValidator can't catch if the text case changed for e.g,
User Name: test ; Password: Test
Use the below code snippet on the button click event,
if (txtUSerName.Text.ToUpper() == txtPassword.Text.ToUpper())
lblError.Text = "ERROR:Username & Password can't be identical";
lblError.Text = "Logged in successfully";
Srinunelli, if this helps please login to Mark As Answer. | Alert Moderator