Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
1.I want to Open the .docx(word file) in the View (.cshtml) where i want to see the word file and able to edit it.
2. Folder Structure:
I'm working on the Jobseeker module and the .docx File uploaded by the Admin and that file present in the Admins Docs Folder.
I'm Creating a view in the Jobseeker module.
3. I installed the Syncfusion.DocIO.Base NuGet Package to open and edit the word file and i Compare the "TemplateName" that i fetch from the database and pass the .docx file path to my view through the ViewBag.
4.Error: I'm able to see view but in that view i just able to see a border box inside nothing else.

What I have tried:

Controller code:
.NET
View: (where i want to see the word file)

"@{
    Layout = null;
}



    <title>Edit Word Document
    
        
        #container {
            width: 100%;
            height: 600px; 
        }
    


    <div id="container"></div>
    
        var ele = document.getElementById('container');
        var editor = new ej.documenteditor.DocumentEditor({
            isReadOnly: false
        });
        editor.appendTo(ele);
        editor.open("@Html.Raw(ViewBag.DocumentPath)");
"
Posted
Updated 13-Apr-24 7:59am
v3

1 solution

You're going to have to get a hold of Syncfusion[^]. It's their control and they have the documentation and support for it.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900