SharePoint itemDeleting evert is not working
Posted
by Clodin
on Stack Overflow
See other posts from Stack Overflow
or by Clodin
Published on 2010-05-27T19:27:23Z
Indexed on
2010/05/29
10:42 UTC
Read the original article
Hit count: 477
Hi!
I have a site in SharePoint and I want to custom delete from a list. So, I'm creating the
public class ListItemEventReceiver : SPItemEventReceiver
{
public override void ItemDeleting(SPItemEventProperties properties)
{
if (properties.ListTitle.Equals("Projects List"))
{
Projects pr = new Projects();
string projectName = properties.ListItem["Project Name"].ToString();
pr.DeleteProject(projectName);
}
}
}
Where 'Projects' class has 'DeleteProject' method who deletes the item. But it's doing nothing :( I mention that everything it's ok in Feature.xml
Where am I wrong?
© Stack Overflow or respective owner