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?:
Rotator.ascx
<%@ 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:RadAjaxLoadingPanel>
<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">
<ItemTemplate>
<div class="itemTemplate">sadasdsasadsadadsa
<img src='<%# Page.ResolveUrl("~/Pictures/") + Container.DataItem %>.jpg' alt="Customer Image" />
</div>
</ItemTemplate>
</telerik:RadRotator>
</telerik:RadAjaxPanel>
************
Rotator.ascx.vb
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()
RadRotator1.DataBind()
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>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<div class="ex">
<uc1:Rotator ID="Rotator1" runat="server" />
</div>
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?:
Rotator.ascx
<%@ 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:RadAjaxLoadingPanel>
<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">
<ItemTemplate>
<div class="itemTemplate">sadasdsasadsadadsa
<img src='<%# Page.ResolveUrl("~/Pictures/") + Container.DataItem %>.jpg' alt="Customer Image" />
</div>
</ItemTemplate>
</telerik:RadRotator>
</telerik:RadAjaxPanel>
************
Rotator.ascx.vb
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()
RadRotator1.DataBind()
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>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<div class="ex">
<uc1:Rotator ID="Rotator1" runat="server" />
</div>