Click or drag to resize
Walkthrough: Creating Your First Project

This walkthrough will guide you through creating your first web application with Aceoffix.

Prerequisites
Before creating a web application, be sure that you have installed the setup-server.exe which is included in download package.
New Project
  1. Open your Visual Studio and create a ASP.NET web application.

  2. Copy the aceoffix-runtime folder into the root of your web application.

  3. Drag the AceoffixCtrl control from the toolbox into the default.aspx. Set default.aspx as the start page. Double-click the control and add the following code to the Load event.

    C#
    AceoffixCtrl1.ServerPage = "aceoffix-runtime/server.aspx"; // Required
    AceoffixCtrl1.OpenDocument("doc/test.doc", Aceoffix.OpenModeType.docNormalEdit, "John Scott");
    Note Note

    It is possible that Aceoffix is invisible when you run the page. You should set the width and height of DIV which contains the Aceoffix. Aceoffix's width and height depend on the width and height of its parent element.

  4. Create a new folder named "doc" at the root of your web application and then create a test.doc file in the "doc" folder.

  5. Run the web application and you will see that the Aceoffix can open the Word document in the Internet Explorer. But now you cannot save the document directly. You can modify your Load code:

    C#
    AceoffixCtrl1.SaveFilePage = "savefile.aspx"; // For saving document
    AceoffixCtrl1.ServerPage = "aceoffix-runtime/server.aspx"; // Required
    AceoffixCtrl1.OpenDocument("doc/test.doc", Aceoffix.OpenModeType.docNormalEdit, "John Scott");

  6. New a web page and name it as "savefile.aspx". Add the following code to this page.

    C#
    Aceoffix.FileRequest freq = new Aceoffix.FileRequest();
    freq.SaveToFile(Server.MapPath("doc/") + freq.FileName);
    freq.Close();

  7. Run the web application and you will see that the document can be saved by save button of Word in the Internet Explorer. Congratulations! You have learned how to online edit Word document with Aceoffix.

See Also

Other Resources