RadRotator in User Control Not displaying

4 posts, 0 answers
  1. Colin Armstrong
    Colin Armstrong avatar
    1 posts
    Member since:
    Dec 2009

    Posted 05 Oct 2010 Link to this post

    Can you Help?

    The Radrotator displays prefectly when running the website locally using Visual Studio 2010 but as soon as I upload the website to my webspace the Radroator within the usercontrol doesn't show. I've tested the usercontrol displays by just adding some random text, so I must be missing something with the Rotator somewhere.

    Has anyone got any ideas what the problem might be? What am I missing chaps?:

    <%@ Control Language="VB" AutoEventWireup="false" CodeFile="Rotator.ascx.vb" Inherits="Controls_Rotator" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="300px">
                       <telerik:RadRotator ID="RadRotator1" runat="server" Width="300px" Height="600px" ScrollDuration="5000" FrameDuration="5000"
                        ItemWidth="300" ScrollDirection="Down" ItemHeight="300">
                            <div class="itemTemplate">sadasdsasadsadadsa
                                <img src='<%# Page.ResolveUrl("~/Pictures/") + Container.DataItem %>.jpg' alt="Customer Image" />


    Partial Class Controls_Rotator

        Inherits System.Web.UI.UserControl
        Private Property clients As String()
        Private Property document As Object

        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            RadRotator1.DataSource = GetRotatorDataSource()
        End Sub

        Private Function GetRotatorDataSource() As String()
            Dim Currentpage As String
            Currentpage = System.IO.Path.GetFileName(Request.Url.ToString())
            If Currentpage = "New_Builds.aspx" Then
                ' MsgBox("heloo")
                Dim clients As String() = {"new_1", "new_2", "new_3", "new_4"}
                Return clients
            ElseIf Currentpage = "Landscaping.aspx" Then
                Dim clients As String() = {"land_1", "land_2", "land_3", "land_4", "land_5"}
                Return clients
            ElseIf Currentpage = "Renovations-Extensions.aspx" Then
                Dim clients As String() = {"ren_1", "ren_2", "ren_3", "ren_4", "ren_5", "ren_6"}

                Return clients
            End If
            Return clients
        End Function
    End Class

    ASPX Page

    %@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="New_Builds.aspx.vb" Inherits="Pages_New_Builds" %>

    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

    <%@ Register src="../Controls/Rotator.ascx" tagname="Rotator" tagprefix="uc1" %>

    <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
        <div class="ex">
            <uc1:Rotator ID="Rotator1" runat="server" />

  2. Fiko
    Fiko avatar
    1406 posts

    Posted 08 Oct 2010 Link to this post

    Hello Colin,

    Could you please check whether the GetRotatorDataSource method return some data when it is running on the server? I guess that all checks in that method (like If Currentpage = "New_Builds.aspx" Then ...) fail and this cause the behavior on your  side.

    Kind regards,
    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. Amit
    Amit avatar
    1 posts
    Member since:
    Dec 2010

    Posted 26 Dec 2010 Link to this post

    I am also facing similar issue , when i use RadRotator on user contol , it doesnt display , while same thing works fine on a .aspx page.
    I too have cross checked the datasource and for sample i have taken image path. 

    I am not sure if i am missing something or RadRotator doesnt work on user controls ...  
    Please provide your valuable inputs.... 
  4. Fiko
    Fiko avatar
    1406 posts

    Posted 29 Dec 2010 Link to this post

    Hello Colin,

    All RadRotator;s features can be used in any UserControl (or MasterPage) scenarios. For your convenience I have attached a fully working demo to this thread.

    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top