Assembly.GetInterview Method

This method returns a browser-based HTML interview for the Assembly.

For HotDocs 11 forward, when using the GetInterview method (for both .NET and COM APIs), if you try to call GetInterview() without first setting the FormActionUrl on the Assembly object, you get a JavaScript error, though nothing appears on the page.

Syntax

public string GetInterview ( )

Return Value

A string of HTML code that represents the browser-based interview for the Assembly. You can then embed this HTML code in your host application's Web page. (When embedding the interview in a Web page, it is recommended that you do not place anything below the interview. The browser-based interview is designed to expand to the height of the browser window, which would force users to scroll in order to see any text below the interview.)

For JavaScript interviews, the page of your host application in which you insert the HTML returned by this method must use the HTML Transitional document type: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >

Embedding a JavaScript interview in an XHTML page is not supported.

For Silverlight interviews, you must ensure that the Silverlight MIME type is registered in the HDServerFiles\JS application in IIS: Extension: .xap or MIME Type: application/x-silverlight-app. The HotDocs Server install should add this MIME type to IIS automatically when it creates the HDServerFiles virtual directory, but if you create the virtual directory on your own or experience problems with Silverlight interviews, verify that the MIME type exists.

Example

The following Visual C# code sets a few properties of the Assembly object, and then gets an interview to write to the Web page. If the SaveAnswersPageUrl property is not set, the "Save Answers" button will not appear in the interview. If the InterviewFormat property is not set, HotDocs Server will use the value configured in the management tools, or if nothing is set there, it will use JavaScript by default.

// Set some properties for the Assembly.
_session.CurrentAssembly.FormActionUrl = "disposition.aspx";
_session.CurrentAssembly.SaveAnswersPageUrl = "saveanswers.aspx";
_session.CurrentAssembly.InterviewFormat = HotDocs.Server.Interop.interviewFormat.Silverlight;
 
// Get the interview and write it to the Web page.
Response.Write(_session.CurrentAssembly.GetInterview());