Featured Adds problem RRS feed

  • Question

  • User-1306762814 posted
    Hi i am using classifides starter kit. I have a problem regarding the Featured adds. The problem is even if i set many adds as featured adds i can only find only one add being displayed in the home page as featured add. can anyone please give me a solution to my problem so that i can display many adds as featured adds at a time and view many featured adds at a time. Note: All the adds that i have set as featured adds are from the same subcategory Please give me a solution. Thanks in advance.
    Wednesday, September 24, 2008 9:15 PM

All replies

  • User751963951 posted

    AdsDataComponent.AdsDataTable table = AdsDB.GetFeaturedAdsSelection(1);

    You will find this snippet in App_Code/Web/FeatureCahce(.cs or .vb)

    Where it has (1) in brackets above is where you control how many featured items to allow the datasource to access. change it to 2 if you want to display 2 and so on but remember there is code that defines ony 10 to be cahced at any one time so if you need more you will need to locate that snippet and modify it also.

    Wednesday, September 24, 2008 11:31 PM
  • User-1306762814 posted
    Hi Thanks for the reply. The problem is half solved now i can see many many adds. But the problem is there is only one box in which only one featured add is shown at a time. I have set the Private Const CacheLifeTime As Integer = 1 ' in minutes in my code. So every time to see a new add i must refresh the page. I need a code that will show 5 featured adds with images at a time, not a single box with one add at a time and i dont want to refresh everytime to see new adds
    Sunday, September 28, 2008 1:47 PM
  • User751963951 posted

    Just locate the usercontrols in the page's and add more like so.

    This is the original control <uc1:FeaturedAd ID="FeaturedAd" Runat="server" />

    This is another featured ad on the same page <uc1:FeaturedAd ID="FeaturedAd2" Runat="server" />

    If you choose to do this as above you can change  

    Pretty simple [:D]


    Oh and you should leave this code.

    private const int NumCachedFeatures = 10; // Raise to 20+ if you need more to a page or to create less chances to see an ad on refresh.

    private const int CacheLifeTime = 10; // in minutes

    Because all you are doing is creating unessecary data connections to your SQL Database.

    If I have miss understood please let me know.

    Tuesday, September 30, 2008 4:57 AM