I created one event receiver and deployed it, but only users who are site collection admins are able to view this web part. I have included the SPSecurity.RunWithElevatedPrivileges but the same thing. What am I missing?
Below is my code
public override void ItemAdding(SPItemEventProperties properties)
base.ItemAdding(properties);
SPSecurity.RunWithElevatedPrivileges(delegate()
{SPWeb web = properties.OpenWeb();
base.ItemAdding(properties);
string name= web.Lists[properties.ListId].Fields["first name"].InternalName;
var list = web.Lists["location names"];
});}