I still cannot show 3 featured ads on the front page.
I would appreciate, if some one can help[ me out with a working solution
Not sure if you got this yet, maybe it will help someone else. On default.aspx find the featured ad section ad add the additional featured adds like this:
rfurdzik
Contributor
3439 Points
1731 Posts
Re: Only one featured add?
Aug 26, 2007 03:54 PM|LINK
How do I do rotating ads? now the ads show as random. Do I need to check what I am showing using SQL? Any idea how to acomplish this?
I do not think I can use repeater, because of my layout i stoo complex. I have just inserted featuredad ascx control 6 times...
thanks,
Buy Sell Domains - DomainsHeat.com
Free ASP.NET controls: Youtube Web Control and Ajax Zoom Control
greatwebs
Member
2 Points
1 Post
Re: Only one featured add?
Nov 13, 2007 02:14 AM|LINK
Not sure if you got this yet, maybe it will help someone else. On default.aspx find the featured ad section ad add the additional featured adds like this:
<
uc1:FeaturedAd ID="FeaturedAd" EnableViewState="true" Runat="server" /> <uc1:FeaturedAd ID="FeaturedAd1" EnableViewState="true" Runat="server" /> <uc1:FeaturedAd ID="FeaturedAd2" EnableViewState="true" Runat="server" />Rich
aleromer
Member
2 Points
1 Post
Re: Only one featured add?
Jan 10, 2008 05:17 PM|LINK
hi, just replace featuredAd.ascx with this:
<%@ Control Language="C#" CodeFile="FeaturedAd.ascx.cs" Inherits="FeaturedAd_ascx" %>
<asp:Repeater ID="FeaturedAd" runat="server" DataSourceID="FeaturedAdDataSource">
<ItemTemplate>
<div id="featured_item">
<a id="content_start"></a>
<h2>
Destacado</h2>
<p>
<asp:HyperLink ID="PhotoLink" runat="server" NavigateUrl='<%# Eval("Id", "~/ShowAd.aspx?id={0}") %>'><img src='<%# Eval("PreviewImageId", "PhotoDisplay.ashx?photoid={0}&size=medium") %>' alt="Featured Image" style="border:0;" /></asp:HyperLink></p>
<p>
<asp:HyperLink ID="TitleLink" runat="server" Text='<%# Eval("Title") %>' NavigateUrl='<%# Eval("Id", "~/ShowAd.aspx?id={0}") %>'></asp:HyperLink></p>
</div>
</ItemTemplate>
</asp:Repeater>
<asp:ObjectDataSource ID="FeaturedAdDataSource" runat="server" TypeName="AspNet.StarterKits.Classifieds.BusinessLogicLayer.AdsDB"
SelectMethod="GetFeaturedAdsSelection" OnSelected="FeaturedAdDataSource_Selected"> <SelectParameters>
<asp:Parameter Type="Int32" Name="maxNumAds" DefaultValue="3" />
</SelectParameters>
</asp:ObjectDataSource>