ASP.NET MVC pagedlist loose checkboxlist filter
up vote
0
down vote
favorite
I'm working on an Asp MVC application that contains a grid of data that I can filter with a checkboxlist.I'm using PagedList to display the data. My filter works well on the first page, but if I click on the 2nd page, the filter is cancelled. I don't have this problem with filter using dropdownlist(it's not in the following example).
My view looks like this:
<div class="wrapper">
<nav id="sidebar">
@using (Html.BeginForm("Index", "Missions", FormMethod.Get))
{
@Html.EditorFor(x => x.Decision)
}
</nav>
<div id="content" class="container">
<table class="table table-bordered">
<tr>
<th class="col-md-2">
Decision
</th>
</tr>
@foreach (var item in Model.OnePageOfMissions)
{
<tr>
<td class="col-md-1">
@Html.DisplayFor(modelItem => item.decision)
</td>
</tr>
}
@Html.PagedListPager((IPagedList)Model.OnePageOfMissions, page => Url.Action("Index", new { page, Decision = Model.Decision}))
</table>
</div>
I created a template to display checkboxlist like this:
<div class="form-check row">
@Html.HiddenFor(x => x.ID)
@Html.CheckBoxFor(x => x.IsChecked, htmlAttributes: new { onchange = "form.submit();", @class = "form-check-input col-md-2" })
@Html.LabelFor(x => x.Display, Model.Display, htmlAttributes: new { @class = "form-check-label col-md-8" })
My controller looks like this:
public ActionResult Index(int? page, List<CheckBoxListItem> Decision)
{
IndexViewModel model = new IndexViewModel();
//Display Missions
model.missionsList = db.missions_supportmission.ToList();
//Retrieve parameters
model.Decision = Decision;
//PagedList
var pageNumber = page ?? 1; // if no page was specified in the querystring, default to the first page (1)
var onePageOfMissions = model.missionsList.ToPagedList(pageNumber, 10); // will only contain 10 products max because of the pageSize(equel to 10)
model.OnePageOfMissions = onePageOfMissions;
//Filter
if (model.Decision != null)
{
var selecteddecision = model.Decision.Where(x => x.IsChecked).Select(x => x.ID);
model.OnePageOfMissions = (from m in db.missions_supportmission
join l in db.list_decision
on m.decision equals l.decision_id
where selecteddecision.Contains(l.decision_id)
select m)
.OrderBy(a => a.id)
.ToPagedList(pageNumber, 10);
}
}
}
//Display CheckBox
//Checkboxlist (!important => mettre ce bloc de code après la requête link qui permet de filtrer sur les checkbox)
var allDecisions = db.list_decision.ToList();//returns List<list_decision>
var checkBoxListItems = new List<CheckBoxListItem>(); //nouvelle instance de la classe checkboxlist
model.Decision = checkBoxListItems;
foreach (var decison in allDecisions)
{//On assigne les valeurs "id", "display" et "is checked" à la variable checkboxlistitem
checkBoxListItems.Add(new CheckBoxListItem()
{
ID = decison.decision_id,
Display = decison.name_en,
IsChecked = false //On the add view, no decision are selected by default
});
}
return View(model);
}
I have also a ViewModel:
namespace MissionsDF.Models
{
public class IndexViewModel
{
public IEnumerable<missions_supportmission> missionsList { get; set; }
public List<CheckBoxListItem> Decision { get; set; }
public IndexViewModel()
{
this.Decision = new List<CheckBoxListItem>();
}
public IPagedList<missions_supportmission> OnePageOfMissions { get; set; }
}
}
asp.net-mvc filter checkboxlist pagedlist
|
show 3 more comments
up vote
0
down vote
favorite
I'm working on an Asp MVC application that contains a grid of data that I can filter with a checkboxlist.I'm using PagedList to display the data. My filter works well on the first page, but if I click on the 2nd page, the filter is cancelled. I don't have this problem with filter using dropdownlist(it's not in the following example).
My view looks like this:
<div class="wrapper">
<nav id="sidebar">
@using (Html.BeginForm("Index", "Missions", FormMethod.Get))
{
@Html.EditorFor(x => x.Decision)
}
</nav>
<div id="content" class="container">
<table class="table table-bordered">
<tr>
<th class="col-md-2">
Decision
</th>
</tr>
@foreach (var item in Model.OnePageOfMissions)
{
<tr>
<td class="col-md-1">
@Html.DisplayFor(modelItem => item.decision)
</td>
</tr>
}
@Html.PagedListPager((IPagedList)Model.OnePageOfMissions, page => Url.Action("Index", new { page, Decision = Model.Decision}))
</table>
</div>
I created a template to display checkboxlist like this:
<div class="form-check row">
@Html.HiddenFor(x => x.ID)
@Html.CheckBoxFor(x => x.IsChecked, htmlAttributes: new { onchange = "form.submit();", @class = "form-check-input col-md-2" })
@Html.LabelFor(x => x.Display, Model.Display, htmlAttributes: new { @class = "form-check-label col-md-8" })
My controller looks like this:
public ActionResult Index(int? page, List<CheckBoxListItem> Decision)
{
IndexViewModel model = new IndexViewModel();
//Display Missions
model.missionsList = db.missions_supportmission.ToList();
//Retrieve parameters
model.Decision = Decision;
//PagedList
var pageNumber = page ?? 1; // if no page was specified in the querystring, default to the first page (1)
var onePageOfMissions = model.missionsList.ToPagedList(pageNumber, 10); // will only contain 10 products max because of the pageSize(equel to 10)
model.OnePageOfMissions = onePageOfMissions;
//Filter
if (model.Decision != null)
{
var selecteddecision = model.Decision.Where(x => x.IsChecked).Select(x => x.ID);
model.OnePageOfMissions = (from m in db.missions_supportmission
join l in db.list_decision
on m.decision equals l.decision_id
where selecteddecision.Contains(l.decision_id)
select m)
.OrderBy(a => a.id)
.ToPagedList(pageNumber, 10);
}
}
}
//Display CheckBox
//Checkboxlist (!important => mettre ce bloc de code après la requête link qui permet de filtrer sur les checkbox)
var allDecisions = db.list_decision.ToList();//returns List<list_decision>
var checkBoxListItems = new List<CheckBoxListItem>(); //nouvelle instance de la classe checkboxlist
model.Decision = checkBoxListItems;
foreach (var decison in allDecisions)
{//On assigne les valeurs "id", "display" et "is checked" à la variable checkboxlistitem
checkBoxListItems.Add(new CheckBoxListItem()
{
ID = decison.decision_id,
Display = decison.name_en,
IsChecked = false //On the add view, no decision are selected by default
});
}
return View(model);
}
I have also a ViewModel:
namespace MissionsDF.Models
{
public class IndexViewModel
{
public IEnumerable<missions_supportmission> missionsList { get; set; }
public List<CheckBoxListItem> Decision { get; set; }
public IndexViewModel()
{
this.Decision = new List<CheckBoxListItem>();
}
public IPagedList<missions_supportmission> OnePageOfMissions { get; set; }
}
}
asp.net-mvc filter checkboxlist pagedlist
You cannot pass a collection of complex objects in a url usingnew { Decision = Model.Decision}
(look at the url it is generating) - you need to pass each property of each item in the collection to make it bind - but that would make no sense because you would probably exceed the query string limit and throw an exception. One option would be to have a (say)string SelectedDecisions
property in the view model containing a comma separated string of the selected ID's, and pass that back in the url, and split it in the POST method.
– Stephen Muecke
Nov 7 at 20:55
I don't see how to do have a property containing a comma separated string of the selected ID's. Can you illustrate your idea?
– AmélieV
Nov 8 at 8:59
Add that property to your view model (and set its value usingif(Decision != null){ var selected = Decision.Where(x => x.IsChecked).Select(x => x.ID); model.SelectedDecisions = String.Join(",", selected); } else { model.SelectedDecisions = selectedDecisions; }
, then add astring selectedDecisions
parameter to your model and in the view use@Html.PagedListPager((IPagedList)Model.OnePageOfMissions, page => Url.Action("Index", new { page, selectedDecisions = Model.SelectedDecisions})
.
– Stephen Muecke
Nov 8 at 9:10
If you post the form,Decision
will have a value, otherwise if you click a page number, thenselectedDecisions
will have the value. But yournew { onchange = "form.submit();
in theCheckBoxFor()
is terrible practice (and means the user can only ever click one checkbox) - you should allow the user to make their selections and then click a submit button
– Stephen Muecke
Nov 8 at 9:13
You will also need to modify theif (model.Decision != null)
code so that if it isnull
(i.e. user selected a page number), then you would useString.Split(...)
to set yourvar selecteddecision
variable
– Stephen Muecke
Nov 8 at 9:20
|
show 3 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm working on an Asp MVC application that contains a grid of data that I can filter with a checkboxlist.I'm using PagedList to display the data. My filter works well on the first page, but if I click on the 2nd page, the filter is cancelled. I don't have this problem with filter using dropdownlist(it's not in the following example).
My view looks like this:
<div class="wrapper">
<nav id="sidebar">
@using (Html.BeginForm("Index", "Missions", FormMethod.Get))
{
@Html.EditorFor(x => x.Decision)
}
</nav>
<div id="content" class="container">
<table class="table table-bordered">
<tr>
<th class="col-md-2">
Decision
</th>
</tr>
@foreach (var item in Model.OnePageOfMissions)
{
<tr>
<td class="col-md-1">
@Html.DisplayFor(modelItem => item.decision)
</td>
</tr>
}
@Html.PagedListPager((IPagedList)Model.OnePageOfMissions, page => Url.Action("Index", new { page, Decision = Model.Decision}))
</table>
</div>
I created a template to display checkboxlist like this:
<div class="form-check row">
@Html.HiddenFor(x => x.ID)
@Html.CheckBoxFor(x => x.IsChecked, htmlAttributes: new { onchange = "form.submit();", @class = "form-check-input col-md-2" })
@Html.LabelFor(x => x.Display, Model.Display, htmlAttributes: new { @class = "form-check-label col-md-8" })
My controller looks like this:
public ActionResult Index(int? page, List<CheckBoxListItem> Decision)
{
IndexViewModel model = new IndexViewModel();
//Display Missions
model.missionsList = db.missions_supportmission.ToList();
//Retrieve parameters
model.Decision = Decision;
//PagedList
var pageNumber = page ?? 1; // if no page was specified in the querystring, default to the first page (1)
var onePageOfMissions = model.missionsList.ToPagedList(pageNumber, 10); // will only contain 10 products max because of the pageSize(equel to 10)
model.OnePageOfMissions = onePageOfMissions;
//Filter
if (model.Decision != null)
{
var selecteddecision = model.Decision.Where(x => x.IsChecked).Select(x => x.ID);
model.OnePageOfMissions = (from m in db.missions_supportmission
join l in db.list_decision
on m.decision equals l.decision_id
where selecteddecision.Contains(l.decision_id)
select m)
.OrderBy(a => a.id)
.ToPagedList(pageNumber, 10);
}
}
}
//Display CheckBox
//Checkboxlist (!important => mettre ce bloc de code après la requête link qui permet de filtrer sur les checkbox)
var allDecisions = db.list_decision.ToList();//returns List<list_decision>
var checkBoxListItems = new List<CheckBoxListItem>(); //nouvelle instance de la classe checkboxlist
model.Decision = checkBoxListItems;
foreach (var decison in allDecisions)
{//On assigne les valeurs "id", "display" et "is checked" à la variable checkboxlistitem
checkBoxListItems.Add(new CheckBoxListItem()
{
ID = decison.decision_id,
Display = decison.name_en,
IsChecked = false //On the add view, no decision are selected by default
});
}
return View(model);
}
I have also a ViewModel:
namespace MissionsDF.Models
{
public class IndexViewModel
{
public IEnumerable<missions_supportmission> missionsList { get; set; }
public List<CheckBoxListItem> Decision { get; set; }
public IndexViewModel()
{
this.Decision = new List<CheckBoxListItem>();
}
public IPagedList<missions_supportmission> OnePageOfMissions { get; set; }
}
}
asp.net-mvc filter checkboxlist pagedlist
I'm working on an Asp MVC application that contains a grid of data that I can filter with a checkboxlist.I'm using PagedList to display the data. My filter works well on the first page, but if I click on the 2nd page, the filter is cancelled. I don't have this problem with filter using dropdownlist(it's not in the following example).
My view looks like this:
<div class="wrapper">
<nav id="sidebar">
@using (Html.BeginForm("Index", "Missions", FormMethod.Get))
{
@Html.EditorFor(x => x.Decision)
}
</nav>
<div id="content" class="container">
<table class="table table-bordered">
<tr>
<th class="col-md-2">
Decision
</th>
</tr>
@foreach (var item in Model.OnePageOfMissions)
{
<tr>
<td class="col-md-1">
@Html.DisplayFor(modelItem => item.decision)
</td>
</tr>
}
@Html.PagedListPager((IPagedList)Model.OnePageOfMissions, page => Url.Action("Index", new { page, Decision = Model.Decision}))
</table>
</div>
I created a template to display checkboxlist like this:
<div class="form-check row">
@Html.HiddenFor(x => x.ID)
@Html.CheckBoxFor(x => x.IsChecked, htmlAttributes: new { onchange = "form.submit();", @class = "form-check-input col-md-2" })
@Html.LabelFor(x => x.Display, Model.Display, htmlAttributes: new { @class = "form-check-label col-md-8" })
My controller looks like this:
public ActionResult Index(int? page, List<CheckBoxListItem> Decision)
{
IndexViewModel model = new IndexViewModel();
//Display Missions
model.missionsList = db.missions_supportmission.ToList();
//Retrieve parameters
model.Decision = Decision;
//PagedList
var pageNumber = page ?? 1; // if no page was specified in the querystring, default to the first page (1)
var onePageOfMissions = model.missionsList.ToPagedList(pageNumber, 10); // will only contain 10 products max because of the pageSize(equel to 10)
model.OnePageOfMissions = onePageOfMissions;
//Filter
if (model.Decision != null)
{
var selecteddecision = model.Decision.Where(x => x.IsChecked).Select(x => x.ID);
model.OnePageOfMissions = (from m in db.missions_supportmission
join l in db.list_decision
on m.decision equals l.decision_id
where selecteddecision.Contains(l.decision_id)
select m)
.OrderBy(a => a.id)
.ToPagedList(pageNumber, 10);
}
}
}
//Display CheckBox
//Checkboxlist (!important => mettre ce bloc de code après la requête link qui permet de filtrer sur les checkbox)
var allDecisions = db.list_decision.ToList();//returns List<list_decision>
var checkBoxListItems = new List<CheckBoxListItem>(); //nouvelle instance de la classe checkboxlist
model.Decision = checkBoxListItems;
foreach (var decison in allDecisions)
{//On assigne les valeurs "id", "display" et "is checked" à la variable checkboxlistitem
checkBoxListItems.Add(new CheckBoxListItem()
{
ID = decison.decision_id,
Display = decison.name_en,
IsChecked = false //On the add view, no decision are selected by default
});
}
return View(model);
}
I have also a ViewModel:
namespace MissionsDF.Models
{
public class IndexViewModel
{
public IEnumerable<missions_supportmission> missionsList { get; set; }
public List<CheckBoxListItem> Decision { get; set; }
public IndexViewModel()
{
this.Decision = new List<CheckBoxListItem>();
}
public IPagedList<missions_supportmission> OnePageOfMissions { get; set; }
}
}
asp.net-mvc filter checkboxlist pagedlist
asp.net-mvc filter checkboxlist pagedlist
asked Nov 7 at 15:46
AmélieV
35
35
You cannot pass a collection of complex objects in a url usingnew { Decision = Model.Decision}
(look at the url it is generating) - you need to pass each property of each item in the collection to make it bind - but that would make no sense because you would probably exceed the query string limit and throw an exception. One option would be to have a (say)string SelectedDecisions
property in the view model containing a comma separated string of the selected ID's, and pass that back in the url, and split it in the POST method.
– Stephen Muecke
Nov 7 at 20:55
I don't see how to do have a property containing a comma separated string of the selected ID's. Can you illustrate your idea?
– AmélieV
Nov 8 at 8:59
Add that property to your view model (and set its value usingif(Decision != null){ var selected = Decision.Where(x => x.IsChecked).Select(x => x.ID); model.SelectedDecisions = String.Join(",", selected); } else { model.SelectedDecisions = selectedDecisions; }
, then add astring selectedDecisions
parameter to your model and in the view use@Html.PagedListPager((IPagedList)Model.OnePageOfMissions, page => Url.Action("Index", new { page, selectedDecisions = Model.SelectedDecisions})
.
– Stephen Muecke
Nov 8 at 9:10
If you post the form,Decision
will have a value, otherwise if you click a page number, thenselectedDecisions
will have the value. But yournew { onchange = "form.submit();
in theCheckBoxFor()
is terrible practice (and means the user can only ever click one checkbox) - you should allow the user to make their selections and then click a submit button
– Stephen Muecke
Nov 8 at 9:13
You will also need to modify theif (model.Decision != null)
code so that if it isnull
(i.e. user selected a page number), then you would useString.Split(...)
to set yourvar selecteddecision
variable
– Stephen Muecke
Nov 8 at 9:20
|
show 3 more comments
You cannot pass a collection of complex objects in a url usingnew { Decision = Model.Decision}
(look at the url it is generating) - you need to pass each property of each item in the collection to make it bind - but that would make no sense because you would probably exceed the query string limit and throw an exception. One option would be to have a (say)string SelectedDecisions
property in the view model containing a comma separated string of the selected ID's, and pass that back in the url, and split it in the POST method.
– Stephen Muecke
Nov 7 at 20:55
I don't see how to do have a property containing a comma separated string of the selected ID's. Can you illustrate your idea?
– AmélieV
Nov 8 at 8:59
Add that property to your view model (and set its value usingif(Decision != null){ var selected = Decision.Where(x => x.IsChecked).Select(x => x.ID); model.SelectedDecisions = String.Join(",", selected); } else { model.SelectedDecisions = selectedDecisions; }
, then add astring selectedDecisions
parameter to your model and in the view use@Html.PagedListPager((IPagedList)Model.OnePageOfMissions, page => Url.Action("Index", new { page, selectedDecisions = Model.SelectedDecisions})
.
– Stephen Muecke
Nov 8 at 9:10
If you post the form,Decision
will have a value, otherwise if you click a page number, thenselectedDecisions
will have the value. But yournew { onchange = "form.submit();
in theCheckBoxFor()
is terrible practice (and means the user can only ever click one checkbox) - you should allow the user to make their selections and then click a submit button
– Stephen Muecke
Nov 8 at 9:13
You will also need to modify theif (model.Decision != null)
code so that if it isnull
(i.e. user selected a page number), then you would useString.Split(...)
to set yourvar selecteddecision
variable
– Stephen Muecke
Nov 8 at 9:20
You cannot pass a collection of complex objects in a url using
new { Decision = Model.Decision}
(look at the url it is generating) - you need to pass each property of each item in the collection to make it bind - but that would make no sense because you would probably exceed the query string limit and throw an exception. One option would be to have a (say) string SelectedDecisions
property in the view model containing a comma separated string of the selected ID's, and pass that back in the url, and split it in the POST method.– Stephen Muecke
Nov 7 at 20:55
You cannot pass a collection of complex objects in a url using
new { Decision = Model.Decision}
(look at the url it is generating) - you need to pass each property of each item in the collection to make it bind - but that would make no sense because you would probably exceed the query string limit and throw an exception. One option would be to have a (say) string SelectedDecisions
property in the view model containing a comma separated string of the selected ID's, and pass that back in the url, and split it in the POST method.– Stephen Muecke
Nov 7 at 20:55
I don't see how to do have a property containing a comma separated string of the selected ID's. Can you illustrate your idea?
– AmélieV
Nov 8 at 8:59
I don't see how to do have a property containing a comma separated string of the selected ID's. Can you illustrate your idea?
– AmélieV
Nov 8 at 8:59
Add that property to your view model (and set its value using
if(Decision != null){ var selected = Decision.Where(x => x.IsChecked).Select(x => x.ID); model.SelectedDecisions = String.Join(",", selected); } else { model.SelectedDecisions = selectedDecisions; }
, then add a string selectedDecisions
parameter to your model and in the view use @Html.PagedListPager((IPagedList)Model.OnePageOfMissions, page => Url.Action("Index", new { page, selectedDecisions = Model.SelectedDecisions})
.– Stephen Muecke
Nov 8 at 9:10
Add that property to your view model (and set its value using
if(Decision != null){ var selected = Decision.Where(x => x.IsChecked).Select(x => x.ID); model.SelectedDecisions = String.Join(",", selected); } else { model.SelectedDecisions = selectedDecisions; }
, then add a string selectedDecisions
parameter to your model and in the view use @Html.PagedListPager((IPagedList)Model.OnePageOfMissions, page => Url.Action("Index", new { page, selectedDecisions = Model.SelectedDecisions})
.– Stephen Muecke
Nov 8 at 9:10
If you post the form,
Decision
will have a value, otherwise if you click a page number, then selectedDecisions
will have the value. But your new { onchange = "form.submit();
in the CheckBoxFor()
is terrible practice (and means the user can only ever click one checkbox) - you should allow the user to make their selections and then click a submit button– Stephen Muecke
Nov 8 at 9:13
If you post the form,
Decision
will have a value, otherwise if you click a page number, then selectedDecisions
will have the value. But your new { onchange = "form.submit();
in the CheckBoxFor()
is terrible practice (and means the user can only ever click one checkbox) - you should allow the user to make their selections and then click a submit button– Stephen Muecke
Nov 8 at 9:13
You will also need to modify the
if (model.Decision != null)
code so that if it is null
(i.e. user selected a page number), then you would use String.Split(...)
to set your var selecteddecision
variable– Stephen Muecke
Nov 8 at 9:20
You will also need to modify the
if (model.Decision != null)
code so that if it is null
(i.e. user selected a page number), then you would use String.Split(...)
to set your var selecteddecision
variable– Stephen Muecke
Nov 8 at 9:20
|
show 3 more comments
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53192901%2fasp-net-mvc-pagedlist-loose-checkboxlist-filter%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You cannot pass a collection of complex objects in a url using
new { Decision = Model.Decision}
(look at the url it is generating) - you need to pass each property of each item in the collection to make it bind - but that would make no sense because you would probably exceed the query string limit and throw an exception. One option would be to have a (say)string SelectedDecisions
property in the view model containing a comma separated string of the selected ID's, and pass that back in the url, and split it in the POST method.– Stephen Muecke
Nov 7 at 20:55
I don't see how to do have a property containing a comma separated string of the selected ID's. Can you illustrate your idea?
– AmélieV
Nov 8 at 8:59
Add that property to your view model (and set its value using
if(Decision != null){ var selected = Decision.Where(x => x.IsChecked).Select(x => x.ID); model.SelectedDecisions = String.Join(",", selected); } else { model.SelectedDecisions = selectedDecisions; }
, then add astring selectedDecisions
parameter to your model and in the view use@Html.PagedListPager((IPagedList)Model.OnePageOfMissions, page => Url.Action("Index", new { page, selectedDecisions = Model.SelectedDecisions})
.– Stephen Muecke
Nov 8 at 9:10
If you post the form,
Decision
will have a value, otherwise if you click a page number, thenselectedDecisions
will have the value. But yournew { onchange = "form.submit();
in theCheckBoxFor()
is terrible practice (and means the user can only ever click one checkbox) - you should allow the user to make their selections and then click a submit button– Stephen Muecke
Nov 8 at 9:13
You will also need to modify the
if (model.Decision != null)
code so that if it isnull
(i.e. user selected a page number), then you would useString.Split(...)
to set yourvar selecteddecision
variable– Stephen Muecke
Nov 8 at 9:20