views:

79

answers:

1

Hello everybody,

There are string length limitations in database structure (email is declared as nvarchar[30] for instance) There are lots of html forms that has input textbox fields that should be limited in length for that reason.

What is the best practice to synchronize database fields and html layout input fields length limitations (fot asp.net mvc and EF) ? How do you automatize this feature (declare html layout input fields the same max length as database data they represent)?

Thank you in advance.

A: 

Although, your HTML input maxlength ought to allow 1 character more than your maximum valid length: http://webdeavour.co.uk/articles/maxlength+hinders+usability

Lee Kowalkowski
Thank you for the article :)
Andrew Florko