AwesomeKiosk.Controllers.ApplicantController.PersonalInfo C# (CSharp) Method

PersonalInfo() private method

private PersonalInfo ( System.Web.Mvc.FormCollection collection ) : System.Web.Mvc.ActionResult
collection System.Web.Mvc.FormCollection
return System.Web.Mvc.ActionResult
        public ActionResult PersonalInfo(FormCollection collection)
        {
            //Save the job selection in the session data
            String[] validKeys = collection.AllKeys;
            List<int> selectedJobIds = new List<int>();
            //Add the default set to it.
            selectedJobIds.Add(1);
            for (int i = 0; i < validKeys.Length; i++ )
            {
                var curVal = collection.GetValue(validKeys[i]);
                if (curVal.AttemptedValue != "false")
                {
                    int val = Convert.ToInt32(validKeys[i]);
                    selectedJobIds.Add(val);
                }
            }

            HttpContext.Session["selectedJobIds"] = selectedJobIds;
            //nothing to send the view here
            //This page is only for collecting info
            return View();
        }