BannerInfoProvider GetRandomValidBannerInternal Method Kentico 8.1 API Reference
Returns the BannerInfo structure for the random banner. Banner has to be: - enabled - valid now (ValidFrom and ValidTo) or ValidFrom and ValidTo can be null - and has more than 0 hits and clicks left (or null - unlimited)

Namespace: CMS.BannerManagement
Assembly: CMS.BannerManagement (in CMS.BannerManagement.dll) Version: 8.0.0.0 (8.1.5347.20411)

Parameters

categoryId
Type: OnlineSystem Int32
Category ID.
decrementHitsLeft
Type: OnlineSystem Boolean
If true, hits left (after reaching 0, this banner won't be returned) of the returned banner will be decremented

Return Value

Type: BannerInfo
See Also