How can I get the version number of an selected item (Component/Page)
I am using the below code
VersionedItemData verinfo=csClient.Read(<selecteditemid>, new ReadOptions())
as VersionedItemData;
<selecteditemid> = Component/Page id
Version
and Revision
properties are available in FullVersionInfo
, so you have to cast VersionInfo
of your item:
((FullVersionInfo) verinfo.VersionInfo).Version
VersionItemData.VersionInfo.Version will return you the latest version number.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With