I am using this code to break the permission.But i loss the listitem after refresh the page.Plz help me..
public override void ItemAdded(SPItemEventProperties properties)
{
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite site = new SPSite(properties.Web.Site.ID))
{
using (SPWeb web = site.OpenWeb())
{
SPList list = web.Lists["SampleEvent"];
SPUser user = web.CurrentUser;
SPListItem item = list.GetItemById(84);//i am getting the added item by hardcoding the id
if (!item.HasUniqueRoleAssignments)
{
item.BreakRoleInheritance(false);
}
item.Update();
}
}
});
}

84? – Mihir Oct 30 '12 at 4:49