TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Dr.Ajay Kashyap
NA
521
285.1k
JavaScript Validation For TextBox In Mvc
Feb 3 2017 7:17 AM
I want validation For TextBox And TextBox is List Type So How To Validate Using JavaScript.
The Following Validation I want :-
TextBox Should Not Be Empty
No Duplication
Given Below Is My Code
@model List
@using (Html.BeginForm("CreateCategory", "CategoryAndSubCategory", FormMethod.Post, new { enctype = "multipart/form-data", @id = "category" }))
{
@Html.AntiForgeryToken()
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
@Html.Label("Category Name", htmlAttributes: new { @class = "control-label col-md-2 required" })
@Html.EditorFor(a => a[j].Category, new { @class = "form-control", @placeholder = "Enter Category Name", @style = "text-transform: capitalize" })
@Html.ValidationMessageFor(a => a[j].Category, "", new { @class = "text-danger" })
}
}
<!-- Inject Script Filtered -->
Reply
Answers (
3
)
modelstats.isvalid
To get facebook contact email address in asp.net mvc5