How can I get the version number of the selected item in tridion?

How can I get the version number of the selected item (Component / Page)

I am using the code below

VersionedItemData verinfo=csClient.Read(<selecteditemid>, new ReadOptions()) as VersionedItemData; <selecteditemid> = Component/Page id 
+4
source share
2 answers
The properties

Version and Revision are available in FullVersionInfo , so you need to discard VersionInfo your element:

 ((FullVersionInfo) verinfo.VersionInfo).Version 
+11
source

VersionItemData.VersionInfo.Version will return you the latest version number.

+1
source

All Articles