Exercise 1 – Add a Feature Receiver Class
Task 1 – Add a Feature Receiver Class
In this task, you will add a feature receiver class to your SharePoint project that will allow you to add custom code that will run when the feature is activated.
Task 2 – Populate the list
In this task, you will override the FeatureActivated method to insert data into an existing list. When the feature is activated, the code in the FeatureActivated method of the feature receiver will run. You will use this to add some items to a list.
Task 3 – Test the Solution
In this task, you will deploy your solution to your SharePoint on-premises site and verify that the list is populated correctly.
Task 4 – Deploy the Solution to SharePoint Online
In this task, you will deploy the solution package to SharePoint online to confirm that it works as expected.