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

RADRotator used in master page

3 Answers 109 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Milind
Top achievements
Rank 1
Milind asked on 17 Sep 2009, 05:44 AM
Hi,

I am trying to use rotator in master page. The master page code is below:

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>eReception</title>
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .newsFeed
        {
            width: 100%;
            padding: 14px 0 0 20px;
            margin: 0 0 2px 0;
        }
    </style>        
</head>
<body style="background-image:url(Images/BodyVmn.gif);margin-bottom:0; margin-left:0; margin-right:0;margin-top:0;">
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" Skin="WebBlue" />
        <div style="text-align: center">
            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                <tr>
                    <td rowspan="2" style="width: 65%; height: 100%; background-color: #003366; text-align: left;">
                        <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/vmn.jpg" Height="119px" Width="392px" /></td>
                    <td style="width: 35%; background-color: #003366; text-align: right;">
                        <span style="font-size: 24pt; color: #ffffff"><strong>
                            <asp:Image ID="Image2" runat="server" ImageUrl="../Images/jjl.jpg" />&nbsp;</strong></span></td>
                </tr>
                <tr>
                    <td style="width: 35%; background-color: #003366; text-align: right">
                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="right">
                                    <asp:Label ID="lblWelcome" runat="server" Visible="true" Text="Welcome Milind" CssClass="labelStyleSimpleBoldWhite" />&nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td align="right" style="height:8px">
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Button ID="btnLogOut" runat="server" Visible="true" Text="Sign Off" OnClick="btnLogOut_Click" />&nbsp;
                                </td>                                
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
        <div>
            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; background-color:Black;">
                <tr>    
                    <td style="width:100%; height:4px; background-color:Silver;">
                    </td>
                </tr>
                <tr>
                    <td style="width:10%; height:25px;">
                        &nbsp;<asp:Label ID="lblNews" Text="News Headlines : " runat="server" CssClass="labelStyleSimpleBoldWhite" />
                    </td>
                    <td style="width:90%; height:45px;">
                        <telerik:RadRotator ID="RadRotator1" RotatorType="AutomaticAdvance" ScrollDirection="left" ScrollDuration="2000" runat="server" DataSourceID="xmlDataSource1"
                            Width="100%" Height="43px" FrameDuration="1" InitialItemIndex="-1">
                            <ItemTemplate>
                                <div class="newsFeed">
                                    <strong><a href='<%# XPath("link") %>'>
                                        <%# System.Web.HttpUtility.HtmlEncode(XPath("title").ToString())%>
                                    </a></strong>
                                </div>
                            </ItemTemplate>
                        </telerik:RadRotator>
                        <asp:XmlDataSource ID="xmlDataSource1" XPath="rss/channel/item" runat="server" DataFile="http://blogs.telerik.com/Blogs.rss">
                        </asp:XmlDataSource>    
                    </td>
                </tr>
                <tr>
                    <td style="width:100%; height:4px; background-color:Silver;">
                    </td>
                </tr>
            </table>
        </div>
        <div>
            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
                <tr>
                    <td style="width:100%; height:4px; background-color:silver;">
                    </td>
                </tr>
                <tr>
                    <td style="width:100%;">
                        <telerik:RadMenu ID="RadMenu1" runat="server" Skin="Web20" Width="100%">
                            <Items>
                                <telerik:RadMenuItem runat="server" Text="Root RadMenuItem1">
                                    <Items>
                                        <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 1">
                                        </telerik:RadMenuItem>
                                        <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 2">
                                        </telerik:RadMenuItem>
                                    </Items>
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem runat="server" Text="Root RadMenuItem2">
                                    <Items>
                                        <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 1">
                                        </telerik:RadMenuItem>
                                        <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 2">
                                        </telerik:RadMenuItem>
                                    </Items>
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem runat="server" Text="Root RadMenuItem3">
                                    <Items>
                                        <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 1">
                                        </telerik:RadMenuItem>
                                    </Items>
                                </telerik:RadMenuItem>
                            </Items>
                        </telerik:RadMenu>
                    </td>
                </tr>
                <tr>    
                    <td style="width:100%; height:4px; background-color:Silver;">
                    </td>
                </tr>
            </table>
        </div>
        <div>
            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                <tr>
                    <td align="center" style="width:100%;  height:450px; vertical-align:top;">
                        <telerik:RadSplitter ID="RadSplitter1" runat="server" CssClass="Outlook" LiveResize="True" ResizeMode="EndPane" Width="100%" BackColor="Transparent" Height="500px">
                            <telerik:RadPane ID="RADContentPanel" runat="server" BackColor="Transparent" Width="99%">
                                <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
                                </asp:contentplaceholder>
                            </telerik:RadPane>
                            <telerik:RadSplitBar ID="RadSplitbar1" runat="server" CollapseMode="Backward" BackColor="Transparent" ></telerik:RadSplitBar>
                            <telerik:RadPane ID="RadMenuPane" runat="server" Scrolling="None" BackColor="Transparent" Width="1%">
                                <telerik:RadSlidingZone ID="RadSlidingZone1" runat="server" BackColor="Transparent" SlideDirection="Left">
                                    <telerik:RadSlidingPane ID="RadSlidingPane1" runat="server" Title="Notes" BackColor="Transparent" > </telerik:RadSlidingPane>  
                                    <telerik:RadSlidingPane ID="RadSlidingPane2" runat="server" Title="Circulars" BackColor="Transparent" > </telerik:RadSlidingPane>  
                                </telerik:RadSlidingZone>
                            </telerik:RadPane>
                        </telerik:RadSplitter>
                    </td>
                </tr>
            </table>        
        </div>
    </form>
</body>
</html>

Here I am using the RSS feed from telerik. When the page is loaded it simply shows nothing. If I use the same rotator code in a normal page it produces the result.

Can someone tell me is there any thing wrong with the way it is used in master page ?

Thanks & Regards,
-Milind Shevade

3 Answers, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 22 Sep 2009, 12:07 PM
Hi m,

We have already answered your support ticket.

Greetings,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Rob
Top achievements
Rank 1
answered on 07 May 2010, 10:05 AM
What was the answer to this? 

I have a very similar problem. Looking at it with firebug, it lookes like the area that is defined for the images is way too big, so it "shows" a load of empty spaces before it gets to the actual images.

The same code works fine in a normal page.

Thanks

Rob
0
Rob
Top achievements
Rank 1
answered on 08 May 2010, 01:56 AM
No worries - I figured out an answer.

Simple really, I created a .ascx file for the rotator, and placed that on the master page, and it works perfectly.

Cheers

Rob Lewis - PaxMondeo
Tags
Rotator
Asked by
Milind
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Rob
Top achievements
Rank 1
Share this question
or