properties.Afterproperties -attachment RRS feed

  • Question

  • Hello everyone, 

    I want to check my attached excel colum names when item adding. how can i do that?

    for ex: I want to get the first column name as; FirstName but if excel's first column name is First_Name it should give error. 

    so; in item added event i can get my attachment as,


     SPListItem item = properties.ListItem;

               foreach (string fileName in item.Attachments)

                   SPFile file = item.ParentList.ParentWeb.GetFile(
                   item.Attachments.UrlPrefix + fileName);

    but I cant get SPListItem as properties.Afterproperties. 

    any suggessions?

    Thursday, September 5, 2013 3:00 PM