Previous Walkthrough Next Walkthrough
Walkthrough 2: Loading an Answer File and Other Session Options
Prerequisites:
Instructions:
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using HotDocs.Cloud.Client; namespace EmploymentAgreement { public partial class Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected string GetSessionID() { var client = new RestClient("SUBSCRIPTION_ID", "SIGNING_KEY"); return client.CreateSession("Employment Agreement", Server.MapPath("~/EmploymentAgreement.hdpkg"), answers: (new System.Net.WebClient()).DownloadString("http://files.hotdocs.ws/walkthrough/EmploymentAgreement.anx")); } } }
return client.CreateSession("Employment Agreement", Server.MapPath("~/EmploymentAgreement.hdpkg"), markedVariables: new string[] { "Employee Name", "Employee Gender" });
return client.CreateSession("Employment Agreement", Server.MapPath("~/EmploymentAgreement.hdpkg"), interviewFormat: HotDocs.Sdk.Server.Contracts.InterviewFormat.Silverlight);
return client.CreateSession("Employment Agreement", Server.MapPath("~/EmploymentAgreement.hdpkg"), outputFormat: HotDocs.Sdk.Server.Contracts.OutputFormat.DOCX | HotDocs.Sdk.Server.Contracts.OutputFormat.PDF);
return client.CreateSession("Employment Agreement", Server.MapPath("~/EmploymentAgreement.hdpkg"), settings: new Dictionary<string, string>() { { "UnansweredFormat", "Underscores" } });
return client.CreateSession("Employment Agreement", Server.MapPath("~/EmploymentAgreement.hdpkg"), theme: "mynewtheme");