FileRequestShowPage Method |
Namespace: Aceoffix
After save document, if you want to prompt a custom dialog box to show the saving result, you can call this method.
The message page shown in the dialog box is the current SaveFilePage. By default, the SaveFilePage will display nothing. You can add friendly messages in the ASPX of SaveFilePage.
The following code example shows how to use the ShowPage method to let AceoffixCtrl display a custom error dialog box to user.
protected void Page_Load(object sender, EventArgs e) { Aceoffix.FileRequest freq = new Aceoffix.FileRequest(); if((freq.FileExtName == "doc")||(freq.FileExtName == "docx")) // Only save the Word documents. { freq.SaveToFile(Server.MapPath("doc/") + freq.FileName); freq.Close(); } else { Response.Write("Failed to save. The current document is not a Word document."); // This is a simple error message, you can add friendly message to the current page. freq.ShowPage(380, 200); // If the document is not a Word document, AceoffixCtrl will open a modal dialog to show the custom error page. } }