Show message when user exceed limit size of a textbox in asp.net mvc app
I am developing a mvc application in that I want to display a message when the user types more than 20 characters in the textbox. This needs to validate without clicking on any validate button.
This is my current code :
<span class="field">@Html.TextBoxFor(d => d.Name,new {maxlength=20})</span>
Sunil Singh
16-Nov-2017Use this code
In the Model
View code