ads in the rotator

2 posts, 1 answers
  1. komathi priya
    komathi priya avatar
    30 posts
    Member since:
    Apr 2010

    Posted 26 Jul 2010 Link to this post


    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" >
                           <a  id="Navigation" runat="server" >
                                <asp:Image ID="imgAd"  runat="server" /> 

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


  2. Answer
    Pero avatar
    1156 posts

    Posted 29 Jul 2010 Link to this post

    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();

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

    Sincerely yours,
    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
  3. DevCraft R3 2016 release webinar banner
Back to Top