ASP.NET MVC Interface Controls - Textbox -
MaxLength property


MaxLength="10"


MaxLength="5"



Use the MaxLength property to specify the maximum number of characters that can be typed into the textbox.
C#
Html.Obout(new OboutTextBox("txt1") { MaxLength = 10 })