This is a migrated thread and some comments may be shown as answers.

navigation in the rotator

1 Answer 23 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
komathi priya
Top achievements
Rank 1
komathi priya asked on 23 Jul 2010, 08:08 AM
hi,


i'm new to the telerik controls,  i want to show the ads in rotator, i used the following code but it's not working,
 
the design coding
  <telerik:RadRotator id="radNews" runat="server" ScrollDirection="Up" 
RotatorType="AutomaticAdvance" InitialItemIndex="0"  
ScrollDuration="300" ItemWidth="200px" Width="910px" Height="900px" 
ItemHeight="30px">
<ItemTemplate>
    <asp:Image ID="Image1" ImageUrl='<%#Eval("ImageUrl")%>' runat="server" />
<strong>
<a href='<%#Eva("Url")%>'></a>
</strong>
<br />
<span >Starts:</span>
<span ><%#Eval("PublishedDate")%></span>
<br />
</ItemTemplate>
<SlideShowAnimation Type="Fade" Duration="300" />
</telerik:RadRotator>


i binded the telerik:RadRotator with XML like 
DataSet ds= new DataSet();
ds.ReadXml(Server.MapPath("ad.xml"));
       radNews.DataSource = ds;
        radNews.DataBind();

My XML file is

<Ad>
    <ImageUrl>images\electronic-medical-records-systems.jpg</ImageUrl>
    
<AlternateText>ASP.NET Logo</AlternateText>
    <Keyword>A</Keyword>
  
  <Caption>This is the caption for Ad#1</Caption>
    <Title>Test</Title>
    <TargetDate>2/10/2009</TargetDate>
    <Url>www.telerik.com</Url>
    <NewWindow>True</NewWindow>
    <PublishedDate>11/1/2008</PublishedDate>
  </Ad>


If i click the ad image i want to navigate to the url given.  It's working in asp rotator if i give as target file = "Xml file name" 

Please reply me soon , i'm in need to complete soon,



1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 23 Jul 2010, 08:37 AM
Hello Komathi,

Here I found some links which shows how to bind RadRotator control with XML file. I hope it will help you.
Binding to ASP DataSource components
Rotator / Slide Show

Have you tried XmlDataSource?

-Shinu.
Tags
Rotator
Asked by
komathi priya
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or