Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 如何制作Microsoft Word文档“;只读”;在SharePoint文档库中?_Asp.net_Visual Studio 2008_Sharepoint - Fatal编程技术网

Asp.net 如何制作Microsoft Word文档“;只读”;在SharePoint文档库中?

Asp.net 如何制作Microsoft Word文档“;只读”;在SharePoint文档库中?,asp.net,visual-studio-2008,sharepoint,Asp.net,Visual Studio 2008,Sharepoint,如何使“只读”成为SharePoint文档库中的唯一选项 使用Word 2003或2007并将文档另存为模板或将文件属性修改为“只读”时,不会阻止修改SharePoint文档库中的文件。修改文档库权限以仅允许“只读”访问也不起作用。有效的方法是使用SharePoint URL链接列表来访问外部服务器目录中的文件,但这会妨碍使用SharePoint文档库。我不知道是否可以强制只读作为唯一选项,但您可以实现自己的事件处理程序来覆盖ItemUpdate事件。只需取消更新,任何更改都将被放弃 Sahil

如何使“只读”成为SharePoint文档库中的唯一选项


使用Word 2003或2007并将文档另存为模板或将文件属性修改为“只读”时,不会阻止修改SharePoint文档库中的文件。修改文档库权限以仅允许“只读”访问也不起作用。有效的方法是使用SharePoint URL链接列表来访问外部服务器目录中的文件,但这会妨碍使用SharePoint文档库。

我不知道是否可以强制只读作为唯一选项,但您可以实现自己的事件处理程序来覆盖ItemUpdate事件。只需取消更新,任何更改都将被放弃


Sahil展示了一个执行取消的非常基本的事件处理程序。

事件处理程序可以工作,但我发现了一个更简单的解决方法

如果您“签出”文件并将其保持签出状态,则其他人无权编辑该文件。这仍然不理想,但对于强制文档为“只读”来说,它是有效的