public ActionResult Example5() { Util.SetPersistentEncryptionKey("ExampleKey"); var interviewFragment = GetInterviewFragment(); var model = new InterviewModel { InterviewFragment = interviewFragment }; return(View(model)); }
private static void AssembleDocuments() { Util.SetPersistentEncryptionKey("ExampleKey"); var session = CreateWorkSession(); while (!session.IsCompleted) { var currentWorkItem = session.CurrentWorkItem; if (currentWorkItem is InterviewWorkItem) { var interviewHtmlFragment = session.GetCurrentInterview(); //Show interview to user, receive postback containing answers var answers = GetAnswers(); session.FinishInterview(answers); } var docs = session.AssembleDocuments("logref"); foreach (var doc in docs) { //Process each document as needed. For example, save document to disk, as in Example 2. } } }