I have the following event receiver which will get fired when a custom list item is created, and the event receiver is scoped at the site level.:-
public override void ItemAdded(SPItemEventProperties properties)
{
base.ItemAdded(properties);
SPWeb spCurrentSite = properties.OpenWeb();
now when i hover my mouse over the SPWeb spCurrentSite = properties.OpenWeb();
line of code , i got this missleading documentation:-
so it mentioned that the OpenWeb()
will return an object of type SPWeb
but at the same time the documentation is saying "Returns the site in which the event occurred"!! so should the documentation be "Returns the web in which the event occurred" by replacing site with web !! as the OpenWeb() will return the current web (could be a sub-site) and not the current site collection .. is this correct ?
thanks