Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Sep 13, 2006 12:28 AM by scokim
Sep 09, 2006 04:51 PM|LINK
Has anyone figured out how to best extend the current featured ad functionality to showcase say n amount of ads on the homepage?
Sep 11, 2006 06:23 AM|LINK
I think in page /Web_code/WebFeatureCache.VB you can specificy the maxNumAds by changing the number in bold as shown below.
However, I don't know why asp:repeater in default.aspx doesn't parse all 3 feature ads, it only displays 1 ad.
Private Shared Function FetchFeaturedAd() As CachedFeaturedAd
Dim feature As CachedFeaturedAd = Nothing
Dim table As AdsDataComponent.AdsDataTable = AdsDB.GetFeaturedAdsSelection(3) <---
If Not (table Is Nothing) AndAlso table.Rows.Count > 0 Then
Dim featuredAd As AdsDataComponent.AdsRow = CType(table.Rows(0), AdsDataComponent.AdsRow)
feature = New CachedFeaturedAd(featuredAd.Id, featuredAd.PreviewImageId, featuredAd.Title, featuredAd.Description)
Sep 11, 2006 06:09 PM|LINK
hmm, yeah the asp:repeater is implemented in Controls/FeaturedAd.asxc and the FeaturedAdDataSource seens alright? Perhaps a problem with the caching?
Sep 11, 2006 08:07 PM|LINK
Sep 11, 2006 10:29 PM|LINK
strange i rewrote it to the following:
DataTable AdsDataComponentAdsDataTable =
And i set a breakpoint, but no matter what AdsDataComponentAdsDataTable will always only contain 1 row ?
Sep 11, 2006 10:30 PM|LINK
Sep 13, 2006 12:28 AM|LINK
The solution can be found here