Click or drag to resize
AceoffixCtrlSaveDataPage Property
Sets or retrieves a value that indicates with which page developers would like to receive and save the data sent by AceoffixCtrl.

Namespace: Aceoffix
Assembly: Aceoffix (in Aceoffix.dll) Version: 5.0.0.1
Syntax
public string SaveDataPage { get; set; }

Property Value

Type: String

The property has no default value. SaveDataPage is the URL of Web page used to receive and save data from the document.

Note Note
The URL can be a relative URL or a complete URL which starts with "http". The relative URL can be relative to the URL of current page and it also can be a root relative URL. The root relative URL starting with "/" is relative to the root path of the application.

Note: If the URL is a complete URL, make sure that this URL must link to the current website instead of other websites.

It is recommended that you use a relative URL to make the application more portable.

Remarks

This is an important property of AceoffixCtrl. If you need to save data inputted by users in the document, you must set a value to SaveDataPage property before you call the OpenDocument method. SaveDataPage is the URL of Web page used to receive and save data from the document.

If the document is Word document, the OpenMode in OpenDocument must be Aceoffix.OpenModeType.docSubmitForm. If the document is Excel document, the OpenMode in OpenDocument must be Aceoffix.OpenModeType.xlsSubmitForm.

After setting SaveDataPage property, you should create the SaveData page to receive and save the data sent by AceoffixCtrl. In SaveData page, you must create WordDocument or Workbook object to get data from the document.

Note Note

When AceoffixCtrl is saving document, AceoffixCtrl will first submit data extracted from the document to page specified by SaveDataPage and then submit the document file to page specified by SaveFilePage.

If the SaveDataPage property is not assigned, submitting data action will not execute. If the SaveFilePage property is not assigned, submitting file action will not execute. If both SaveDataPage property and SaveFilePage property are not assigned, AceoffixCtrl will report an error when saving document.

Examples

The following example shows how to use the SaveDataPage property.

Word code example:

AceoffixCtrl1.ServerPage = "aceoffix-runtime/server.aspx"; // Required
Aceoffix.WordWriter.WordDocument wd = new Aceoffix.WordWriter.WordDocument();
Aceoffix.WordWriter.DataRegion dataRegion = wd.OpenDataRegion("name");
dataRegion.Editing = true;
AceoffixCtrl1.Bind(wd); // The data source is a WordDocument object.
AceoffixCtrl1.SaveDataPage = "doc/savedata.aspx";
AceoffixCtrl1.OpenDocument("doc/test.doc", Aceoffix.OpenModeType.docSubmitForm, "John Scott");

Excel code example:

AceoffixCtrl1.ServerPage = "aceoffix-runtime/server.aspx"; // Required
Aceoffix.ExcelWriter.Workbook wb = new Aceoffix.ExcelWriter.Workbook();
Aceoffix.ExcelWriter.Sheet sheetOrder = wb.OpenSheet("Order");
sheetOrder.OpenCell("B5").ReadOnly = false; // Enable edit
AceoffixCtrl1.Bind(wb); // The data source is a Workbook object.
AceoffixCtrl1.SaveDataPage = "doc/savedata.aspx";
AceoffixCtrl1.OpenDocument("doc/test.xls", Aceoffix.OpenModeType.xlsSubmitForm, "John Scott");
See Also