Ajax response error on save button
<p>Here i am saving the data from form fields and i want to display in my list page. but i am not able to get the list. can any one suggest on this.</p>

<p>here is my list.cshtml code</p>

<pre><code>var saveTrainingProgram = function () {

    console.log('in save');

    $.ajax({
        url: '/Affiliate/TrainingProgram/Save',
        type: 'POST',
        data: {
            trainingProgramName: ff.trainingProgramName.val(),
            colorCode: ff.colorCode.val()
        }
    }).done(function (response) {
        if (response.status === 'success') {



        } else {

        }


    }).fail(function (jqXHR, textStatus) {

        $.isLoading('hide');
    });


};


};
</code></pre>

<p>here is my controller code:</p>

<pre><code>[HttpPost]
[Authorize(Roles = "Affiliate")]
public ActionResult Save(string trainingProgramName, string colorCode)
{
    CbJsonResponse response = new CbJsonResponse();

    int errorCount = 0;
    List&lt;string&gt; errorMessages = new List&lt;string&gt;(5);


    if (string.IsNullOrEmpty(trainingProgramName))
    {
        errorCount++;
        errorMessages.Add("Error: The Training Program Name is required.");
    }

    if (string.IsNullOrEmpty(colorCode))
    {
        // This is not a required field, assign a default value.
        colorCode = CbConstants.TrainingProgramDefaultColorCode;
    }


    if (errorCount == 0)
    {
        Entities.TrainingProgram trainingProgram = new Entities.TrainingProgram();
        trainingProgram.Name = trainingProgramName;
        trainingProgram.ColorCode = colorCode;

   if (TrainingProgramRepository.Instance.SaveTrainingProgram(trainingProgram))
        {

            response.Status = "success";

            TrainingProgramListEntry listEntry = new TrainingProgramListEntry()
            {
                ID = trainingProgram.ID,
                Name = trainingProgram.Name,
                ColorCode = trainingProgram.ColorCode
            };

            // Include the list entry in the response.
            response.Data.Add(listEntry);
        }
    }
    else
    {
        response.Status = "failure";
        response.Meta.Add("errorCount", Convert.ToString(errorCount));
        response.Data.Add(errorMessages);
    }

    return Json(response, "application/json", System.Text.Encoding.UTF8, JsonRequestBehavior.AllowGet);
}
</code></pre>