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
Sagar Bandkar
NA
347
49.1k
Get Checkbox value from view to controller
Dec 6 2016 4:53 AM
I Pass ID as name for checkbox in Grid.MVC ? How to get value of selected Id in controller
But i got null value from controller
@Html.Grid(Model).Named("Grid").Columns(columns =>
{
columns.Add()
.Titled("<input name='allChk' type='checkbox' id='checkbox1' />")
.Encoded(false)
.Sanitized(false)
.SetWidth(30)
.RenderValueAs(c => Html.CheckBox("checked",false, new { @class = "checkBox",name= "inCosId", @
[email protected]
,ID=c.inCosId })).SetWidth(100);
columns.Add(c => c.vcCosCode).Titled("Cost Center Code").Filterable(true);
}).WithMultipleFilters()
controller:-
var ch = form.GetValue("inCosId");
if (ch != null)
{
}
return View();
Reply
Answers (
3
)
How to bind menu,sub menu from database in mvc 5
Why is an out parameter not allowed within an anonymous meth