Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

why my event recevier is firing when "ItemAdded" but not when "ItemUpdated"

$
0
0

I have created an event receiver using Visual studio professional 2012. when i first created i specify that the event receiver will fire when "item was created". and i provided mu business login as follow:-

public class EventReceiver1 : SPItemEventReceiver
    {
        /// <summary>
        /// An item was added.
        /// </summary>
        ///
        public override void ItemAdded(SPItemEventProperties properties)
        {
            base.ItemAdded(properties);
//code goes here
        }
    }

now i need this event receiver to also fire when an item is updated , so i provide the following method:-

public class EventReceiver1 : SPItemEventReceiver { /// <summary> /// An item was added. /// </summary> /// public override void ItemUpdated(SPItemEventProperties properties) { base.ItemUpdated(properties);

//code goes here

then i deploy the event receiver.but now when i add an item the ItemAdded method will get fired. but when i update an item the ItemUpdated method will not get fired? so can anyone adivce on this please?


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>