mmedi005
asked on
How do I set up a AdRotator Control with a SqlDataSource?
How do I set up a AdRotator Control with a SqlDataSource?
this is what i have...can you tell me what I'm dong wrong?
see attached..
this is what i have...can you tell me what I'm dong wrong?
see attached..
.aspx
<asp:Timer ID="uxTimer" Interval="1000" runat="server" />
<asp:UpdatePanel ID="uxAdRotatorUpdatePanel" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="uxTimer" EventName="Tick" />
</Triggers>
<ContentTemplate>
<asp:AdRotator ID="uxAnnouncementsAdRotator" runat="server"
DataSourceID="uxFrontPageSqlDataSource" />
</ContentTemplate>
</asp:UpdatePanel>
<asp:SqlDataSource ID="uxFrontPageSqlDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:infonet %>"
SelectCommand="sp_GetFrontPageAnnouncements"
SelectCommandType="StoredProcedure" />
.cs
protected void Tick(object sender, EventArgs e)
{
uxAdRotatorUpdatePanel.Update();
}
stored proc
SET NOCOUNT ON;
SELECT AlternateTextField, NavigateUrlField, ImageUrlField
FROM FrontPageAnnouncements
WHERE StartDate < getdate() AND EndDate > getdate()
ORDER BY OrderID;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Can I input this in an xml?