Get Published version of a List item Programmatically in Sharepoint

So, if you want to get a publish version of a document or a list item among various draft or un-approved(not published) versions you might do something like below

for (int index = 0; index < item.Versions.Count; index++)

if (item.Versions[index].Level == SPFileLevel.Published)
// Got the Item



Post a Comment


This is a personal weblog. The opinions expressed here represent my own and not those of my employer or anyone else. Should you have any questions or concerns please e-mail me at .

Copyright (c) 2010 @ All rights are reserved.Do Not Copy.

@ Learning