Suppose I have a model named 'company' holding some properties like
- Name
- Address
- fax
And My View (of IEnumarable type (MVC# RAZOR)) has two forms one(form submitting data to different actions) to display list all the available company(existing). And another(form) i used to create new client with Name TextBox
Like
@Html.TextBox("name","")
Here i want to add validation to that particular field.
Suggest me the possible easiest way??
What i tried is http://www.codeproject.com/Articles/39016/Form-validation-with-ASP-NET-MVC(But it doesn't works)