Is there a way to connect to the unobtrusive remote check of MVC3 on the client before the data is sent to the remote method and after the result is returned in a remote way?
I am trying to tell the remote validator to only validate if the submit button is pressed. The usual behavior is to check several times, for example, during keystroke, blur, etc. This is not good, since the verification method under consideration should cause a non-idempotent operation. I need to make sure that this method is called only if the user clicked the submit button.
If I could connect to the before event, I could set a field on the form in which the button to send the button is pressed or not. However, I will need to reset this flag after the remote method returns a test result.
Any other suggestions? This is done to verify the password using the ASP.NET Memberhip Provider method Membership.ValidateUser(string username, string password). This method will increment FailedPasswordAttemtCountevery time an invalid password is sent, so I don’t want it to be executed during blur, click, etc.
source
share