如何在mvc 5中查看和编辑word文档
问题描述:
Hi
如何查看和编辑使用mvc 5 razor保存在sql server中的word文档。
Hi
How to view and edit word document which is saved in sql server using mvc 5 razor.
答
Microsoft或第三方开发人员已经提供了多个此类控件,您可以使用这些控件在ASP.NET网站中嵌入Word文档,只需记住ASP.NET Web应用程序仍然是HTML网站;它只是构成ASP.NET Web应用程序的后端代码。
您可以查看以下几个代码和代码示例来启动此过程。
显示Word文件的简单方法。 [ ^ ]
用于在ASP.NET中显示Word文件的文章(Off-CodeProject) [ ^ ]
用于在ASP.NET中显示文档的代码示例 [ ^ ]。
然后你可以尝试操纵HTML,编辑文件,然后保存回来。
There are multiple such controls that are already provided to you by Microsoft, or from third-party developers, that you can use to embed a Word document inside your ASP.NET webite, just remember an ASP.NET web application is still an HTML website; it is just the back-end code that makes up it to be an ASP.NET web application.
You can have a look at the following few code and code samples to kick-start this process.
Simple method for displaying the Word file.[^]
Article for displaying the Word file in ASP.NET (Off-CodeProject)[^]
Code Sample for document displaying in ASP.NET[^].
You can then try to manipulate the HTML, to edit the file, and then save it back.