I've been asked to repost this question with more detail.
I'm new to MVC and I'd appreciate any supporting explanations although I am quite grounded in .NET development.
Scenario
I have a calendar that posts to a calendar with information when it's selected. It looks like this:
@foreach (var OfflineCalendar in Model.OfflineCalendars.Skip(1))
{
<li data-name="@OfflineCalendar.Name" data-val="@OfflineCalendar.Id">@Html.ActionLink(OfflineCalendar.Name, "Index", new { Id = OfflineCalendar.Id }, new { @class = "location" })</li>
}
The calendar only returns data for a month which passes some data to a ContentResult method.
I've added a Checkbox for archived data.
<label>
Archived
@Html.CheckBox("checkedArchive")
</label>
My Task
I want to add an archived button where a user can view historic data. If this checkbox is checked, it changes some parameters in the ContentResult Data method.
The Dilemma
In .NET I would easily check for whether a checkbox is checked and fire an event based on the calendar that's selected. I'm struggling to do the MVC equivalent.
All I want to do is check if it's checked WHEN a calendar location is selected. If it is, return a bool of true or false. Which will affect the ContentResult.
I don't want to use Ajax. I just simply want to check whether a checkbox is checked when a location is selected. That's all.
Here's the related question I asked: clicky
Thank you for reading.