Simply put, I have a custom editForm.aspx in a document library, that uses my own custom dll. When a user edits a record, I can update all the properties associated with the file, however, when you update the actual document(ie replace it) and then Update() (Or SystemUpdate()), you get the following :
简单地说,我在文档库中有一个自定义的editForm.aspx,它使用我自己的自定义dll。当用户编辑记录时,我可以更新与该文件关联的所有属性,但是,当您更新实际文档(即替换它)然后更新()(或SystemUpdate())时,您将获得以下内容:
The file BLAH.doc has been modified by DOMAIN\ACCOUNT on 01 May 2009 09:41:12 +0100.
文件BLAH.doc已于2009年5月1日09:41:12 +0100由DOMAIN \ ACCOUNT修改。
The file is replaced, but none of the file properties are updated, so path, and filename are the same as the old version!?
文件被替换,但没有更新任何文件属性,因此路径和文件名与旧版本相同!?
this posting: http://hristopavlov.wordpress.com/2008/05/14/uploading-a-file-event-receivers-the-file-has-been-modified-by/ suggests using event recievers, as does anyone who has a similar problem with workflows, using DisableEvents(). Which is great, but I have no idea how to change my editform to work with an event reciever. Is there any documentation/tutorials about updating a file in a document library, and how to use event receivers to accomplish this?
这篇帖子:http://hristopavlov.wordpress.com/2008/05/14/uploading-a-file-event-receivers-the-file-has-been-modified-by/建议使用事件接收者,就像任何人一样使用DisableEvents()与工作流有类似的问题。这很棒,但我不知道如何更改我的editform以使用事件接收器。是否有关于更新文档库中的文件的文档/教程,以及如何使用事件接收器来实现此目的?
1 个解决方案
#1
The event receiver would be completely separate from the edit form - You don't do anything special in the edit form beyond saving whatever the user entered. The event receiver will be called when the item is modified by either your form or one of the standard ones.
事件接收器将与编辑表单完全分开 - 除了保存用户输入的内容之外,您不会在编辑表单中执行任何特殊操作。当您的表单或其中一个表单修改项目时,将调用事件接收器。
#1
The event receiver would be completely separate from the edit form - You don't do anything special in the edit form beyond saving whatever the user entered. The event receiver will be called when the item is modified by either your form or one of the standard ones.
事件接收器将与编辑表单完全分开 - 除了保存用户输入的内容之外,您不会在编辑表单中执行任何特殊操作。当您的表单或其中一个表单修改项目时,将调用事件接收器。