public JsonResult ContactDetails(ContactViewModel contactViewModel) { //AddContactDetails is called to write data(name, email and question) entered by user into a ContactDetails.json file contactHelper.AddContactDetails(contactViewModel); //Return the json result that serializes the contactViewModel object passed here. return(Json(contactViewModel)); }