I am very new to MVC, and am try to set up a series of cascading drop down lists using this example.
But I am stuck a little bit, because I don't know how to get the value from the second drop down and send it to controller when I press the appropriate button.
Here is my view:
    <script type="text/javascript">
    $('#list').change(function() {
        var selectedClient = $(this).val();
        if (selectedClient != null && selectedClient != '') {
            $.getJSON('@Url.Action("SelectC")', { clientID: selectedClient }, function (client) {
                var campaingSelect = $('#clist');
                campaingSelect.empty();
                $.each(client, function(index, clients) {
                    campaingSelect.append($('<option/>', {
                        value: clients.value,
                        text: clients.text
                    }));
                });
            });
        }
    });
</script>
@using (Html.BeginForm("CreateNewCampaign", "Home", FormMethod.Post))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)
    @Html.LabelFor(m => m.alreadyCreatedCampaignName, "Name:")
    @Html.DropDownList("clist","-- Select Client -2-")
    <input type="Submit" name="button" value="Select" class="btn btn-primary" />
}
Controller:
  public ActionResult SelectC(int clientId, CampaignModel model, FormCollection form)
        {
            Session["ClientID"] = clientId;
            ViewBag.ClientName = "You're using: " + Session["ClientName"];
            var CampaignInf = CampaignManagementService.GetCampaigns((string) Session["ticket"], clientId);
            List<AlreadyCreatedCampaignList> itemas = new List<AlreadyCreatedCampaignList>();
            foreach (var element in CampaignInf)
            {
                itemas.Add(new AlreadyCreatedCampaignList() {CampId = element.Key, CampName = element.Value});
            }
            var listOfCam = new SelectList(itemas, "campID", "campName", 1);
            return Json(listOfCam.Select(x => new {value = x.Value, text = x.Text}), JsonRequestBehavior.AllowGet);
        }
I want to get the value to other controller, and I am not sure of the right way to go about doing this.
 
     
    