Click or drag to resize
FileRequestSaveToFile Method
Saves the current document to a disk file.

Namespace: Aceoffix
Assembly: Aceoffix (in Aceoffix.dll) Version: 5.0.0.1
Syntax
public void SaveToFile(
	string SaveAsFileName
)

Parameters

SaveAsFileName
Type: SystemString
To save document to target location, absolute path and file name must be specified. To save document to the folder within website, you may use Server.MapPath() to get the absolute path.
Remarks
Saves the document to disk with a new location and file name. If you want to save the document to database, please call the FileBytes property.
Note Note
The maximum size allowed for a request, which includes uploaded files, is 4 MB, by default. Maximum request size can be specified in the Machine.config or Web.config file in the maxRequestLength attribute of the httpRuntime Element (ASP.NET Settings Schema) element. The maximum request size for a specific page can be specified using the location Element (ASP.NET Settings Schema) element in a Web.config file.
Examples

The following code example demonstrates how to save the document that are uploaded by AceoffixCtrl to the specified folder on the Web server's local disk.

Note Note

In order to display all the possible exception messages when you debug your code, do not use try...catch statements in SaveFilePage.

When an exception is thrown, AceoffixCtrl will show the exception dialog box.

protected void Page_Load(object sender, EventArgs e)
{
    Aceoffix.FileRequest freq = new Aceoffix.FileRequest();
    string strFileName = freq.FileName;
    string strFileExtName = freq.FileExtName;
    int iFileSize = freq.FileSize;

    // The document will be saved to the disk.
    freq.SaveToFile(Server.MapPath("doc/") + strFileName);

    // Once you saved document, please call this method finally.
    freq.Close();
}
See Also