保存对Web部件中的文本文件(或Word doc)所做的更改 [英] Saving the changes made to a text file (or Word doc) in a web part

查看:85
本文介绍了保存对Web部件中的文本文件(或Word doc)所做的更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要允许用户搜索和替换存储在文档库中的一个或多个文档中的文本。这是作为网络部分实施的。到目前为止,我已经成功地允许用户搜索文件,但是如何进行编辑并将更新后的文档保存到库中?任何指导都非常感谢。谢谢!

I need to allow the user to search and replace text in one or more documents stored in a document library. This is being implemented as a web-part. So far I've successfully allowed the user to search for the file(s), but how to make the edits and save the updated doc back to the library? Any guidance is most appreciated. Thanks!

推荐答案

您好maldinix,

Hi maldinix,

如果您想保存对txt文件的更改,则需要使用TextWriter类来保存对文件的更改,有关使用C#将数据写入txt文件的演示供您参考:

If you want to save changes to a txt file, it needs to use TextWriter class to save changes to the file, a demo about write data to txt file using C# for your reference:

使用C#在Windows窗体中将数据保存到文本文件

谢谢

最好的问候


这篇关于保存对Web部件中的文本文件(或Word doc)所做的更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆