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

ads in the rotator

1 Answer 78 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 26 Jul 2010, 01:27 PM
hi,

i want to displays ads in my site, what is the related line for telerik rad rotator as in asp radtator  (( if (e.AdProperties != null)))

i want to show ads in the site i want to know the answer for the following questions,
i use 
how to use telerik rad  rotator ?
how to calculate number of clicks and display  for each image?

    the below code is my rotator.   
here how i want to find give the value from dataset her. if i use <%Eval("Url"%> for link i'm getting error as excepted ; .
<telerik:RadRotator ID="Ad1" runat="server" onitemclick="Ad1_ItemClick" >
                      
                    <ItemTemplate>
                       <a  id="Navigation" runat="server" >
                            <asp:Image ID="imgAd"  runat="server" /> 
                       </a>  
                       
                    </ItemTemplate>
                </telerik:RadRotator>

i saw many demos but i'm not clear
please provide me answer quickly

regards
priya

1 Answer, 1 is accepted

Sort by
0
Accepted
Pero
Telerik team
answered on 29 Jul 2010, 09:45 AM
Hello Priya,

I believe the "Banner Rotation" demo will help you implement your scenario. It shows how to structure the <ItemTemplate> of the rotator to display ad images.
RadRotator does not provide functionality that calculates the number of times an item has been clicked, so you need to implement it yourself. The ItemClick event should be used to save the number of times an item has been clicked. The event handler should look like the following:
protected void ItemClick(object sender, RadRotatorEventArgs e)
{
      stringnavUrl = DataBinder.Eval(e.Item.DataItem, "Url").ToString();
    Response.Redirect(navUrl);
}

The RadRotatorEventArgs contain the object of the RadRotatorItem that was clicked, accessible through the Item property, i.e. e.Item.

Sincerely yours,
Pero
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Rotator
Asked by
komathi priya
Top achievements
Rank 1
Answers by
Pero
Telerik team
Share this question
or