From the version 4.0 version of the .NET framework onwards, we can set our ClientIDMode to static, which means that the ClientID value is set to the value of the ID property, a very different approach to the previous predictable property, which named our controllers with a mixture of the ClientID with the parent container id.

To do this, I set the whole page to static, although this can be done to individual controllers.

The above code validates the UserName, Name and LastName input fields. All of them are verified so that they are not empty, and the UserName is verified with a POST method in order to see if it is not already in use. The important aspect is that we are using the selector property, which indicates what input field is each one (it is done this way since we used the asp:Textbox for our inputs, with the HTML 5 input property that step would not have been necessary).

Lastly, I added a function in addUser.js that verifies if the form is correct, and if it is, to add our user.

And that's pretty much it. The trick of integrating the FormValidation.io plugin into ASP.NET is the names of our controllers, the site's documentation contains another example with a different approach.