In itemupdating event

Microsoft is conducting an online survey to understand your opinion of the Msdn Web site.

in itemupdating event-6

Published) { //Update the published date inside the document byte[] contents = file.

Allow Unsafe Updates = false; Event Firing Enabled = true; base.

An advantage of using Item Updating to set field values is that the values will be visible to the user after they submit their changes in a non-datasheet view.

Because Item Updated is asynchronous, the user may not see their new values when they see the list after submitting the edit.

(no updates required since you are changing the value before it gets saved) I would verify that your Event Receiver is attached to the list.

Are you able to debug your Event Receiver when you modify an item in the list? It appears no matter what you do to the after properties it doesn't change anything It is nice to update Title in Item Adding and Item Updating events since extra Updates are avoided (without Disable Event Firing), and the "Edit Properties view" will already have the Title filled in Some code example to update title based on filename. For working with Title in Lists, ["Title"] needs to be used. I have loged the value before an after changing and can see the value change. public override void Item Adding(SPItem Event Properties properties) { base. Item Adding(properties); string curr Title = properties. After Properties["vti_title"] as string; string url = properties. The reason why item-updating event receiver fires twice in case of document libraries is because of check-in/checkout.Also it can fire twice in case of doc library/list if we are updating the current item values with in this item updating event. public override void Item Updating(SPItem Event Properties properties) { try { //is the item checked out? Event Firing Enabled = false; //do your stuff } } catch(Exception a) { //catch any errors } finally { this.

Tags: , ,