How do I change the default name and location of my form archive Cascading Style Sheet?

Background

As a best practice, we recommend usingCascading Style Sheets (CSS) in your web projects. Cascading Style Sheets are primarily used to reduce complexity and repetition in your design. It is also best practice to locate your CSS within a sub-directory called css and name your form archive style sheet form_archive.css. By default WorkflowGen (more specifically WorkflowPage), will look for a file with the name form_archive.css within the css folder of your web project.

Issue

If, for whatever reason, you need to store your CSS file in another location or change the default CSS file to use, you can accomplish this by changing the value of the FormArchiveCssPath property.

Solution

FormArchiveCssPath

Default value: \css\form_archive.css (this is a relative path within your web project)

Example of how to override the default value

You can specify a different path (within your web project), however the example below demonstrates how to have your CSS files residing outside a web project to be shared among multiple web projects.

In the Page_Load event of your web forms, provide the following line of C# code:

FormArchiveCssPath = "\wfgen\wfapps\webforms\css\history.css";

You may also want to use a single CSS for your web form and form archive. To accomplish this, point your form archive to use your web form’s CSS with the following line of C# code:

FormArchiveCssPath = "\wfgen\wfapps\webforms\[MYPROJECT]\v1\css\form.css";

Furthermore, WorkflowGen allows you to specify the name of the archive file that is generated by the WorkflowPage superclass upon submission of your web form.

FormArchiveFileName

Default value: form_archive.htm

Example of how to override the default value:

In the Page_Load event of your web form provide the following line of C# code:

FormArchiveFileName = "history.htm";