Telerik radMultipage contentUrl not loading pages.

9 posts, 1 answers
  1. Aamir
    Aamir avatar
    18 posts
    Member since:
    Nov 2010

    Posted 24 Oct 2012 Link to this post


    Ok I know this is a Telerik issue and I should had not posted it here. But I trust guys over here.

    I am having problem with RadMultipage contentUrl property. It is not loading the pages. All other radPageViews work fine.
    Code is below.

    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0" AutoPostBack="true"
        Skin="Office2007" MultiPageID="RadMultiPage1">
        <Tabs>
            <telerik:RadTab runat="server" Text="Calender" PerTabScrolling="true" Selected="True" PageViewID="tab1">
            </telerik:RadTab>
            <telerik:RadTab runat="server" Text="Google" PageViewID="tab2">
            </telerik:RadTab>
            <telerik:RadTab runat="server" Text="Quote" PageViewID="tab3">
            </telerik:RadTab>
            
        </Tabs>
    </telerik:RadTabStrip>
     
     
     
     
    <telerik:RadMultiPage ID="RadMultiPage1" runat="server" EnableEmbeddedScripts="true" SelectedIndex="0">
        <telerik:RadPageView ID="tab1" runat="server">
             
            <telerik:RadCalendar ID="calender" Runat="server" Skin="Office2007">
                <WeekendDayStyle CssClass="rcWeekend" />
                <CalendarTableStyle CssClass="rcMainTable" />
                <OtherMonthDayStyle CssClass="rcOtherMonth" />
                <OutOfRangeDayStyle CssClass="rcOutOfRange" />
                <DisabledDayStyle CssClass="rcDisabled" />
                <SelectedDayStyle CssClass="rcSelected" />
                <DayOverStyle CssClass="rcHover" />
                <FastNavigationStyle CssClass="RadCalendarMonthView RadCalendarMonthView_Office2007 RadCalendarMonthView " />
                <ViewSelectorStyle CssClass="rcViewSel" />
            </telerik:RadCalendar>
        </telerik:RadPageView>
        <telerik:RadPageView ID="tab2" runat="server" ContentUrl="http://www.google.com">
        </telerik:RadPageView>
        <telerik:RadPageView ID="tab3" runat="server">
          Anything....
        </telerik:RadPageView>
    </telerik:RadMultiPage>
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 25 Oct 2012 Link to this post

    Hi,
    The content of the pageview is rendered in "iframe" while setting ContentUrl. Here the issue is 'http://www.google.com' will not load in iframe( The reason for this is, that Google is sending an "X-Frame-Options: SAMEORIGIN" response header. This option prevents the browser from displaying iFrames that are not hosted on the same domain as the parent page.)

    Try the following code:
    ASPX:
    <telerik:RadPageView ID="tab2" runat="server" ContentUrl="http://www.telerik.com/community/forums/aspnet-ajax.aspx">
    </telerik:RadPageView>

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Aamir
    Aamir avatar
    18 posts
    Member since:
    Nov 2010

    Posted 26 Oct 2012 Link to this post

    Thank you for answering.
    But still not working for me.
    There seems to be some other problem, when I am using the below code. I can see "Hello World!" in the tab.
    Which I should not see if i am using ContentUrl="" .

    <telerik:RadPageView ID="tab2" runat="server" ContentUrl="http://www.telerik.com/community/forums/aspnet-ajax.aspx">
    Hello World!
    </telerik:RadPageView>
  5. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 26 Oct 2012 Link to this post

    Hello Aamir,

    I have prepared a sample project for you, in order to demonstrate you the correct implementation, which works at my end. Please let us know if you still experience any issue implementing the desired functionality.

    Regards,
    Nencho
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. Aamir
    Aamir avatar
    18 posts
    Member since:
    Nov 2010

    Posted 26 Oct 2012 Link to this post

    I am surprised to see it still doesn't work at my end. I can see the controls or text in the tabs but not external pages or .ascx pages.

    But when I do it programitically it works, Which I don't want actually . Below code works

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            If Not Page.IsPostBack Then
                AddTab("Items")
                AddPageView(RadTabStrip1.FindTabByText("Items"))
                AddTab("Category")
     
            End If
        End Sub
     
        Private Sub AddTab(ByVal tabName As String)
            Dim tab As RadTab = New RadTab
            tab.Text = tabName
            RadTabStrip1.Tabs.Add(tab)
        End Sub
     
        Protected Sub RadMultiPage1_PageViewCreated(ByVal sender As Object, ByVal e As RadMultiPageEventArgs) Handles RadMultiPage1.PageViewCreated
            Dim userControlName As String = e.PageView.ID & ".ascx"
            Dim userControl As Control = Page.LoadControl(userControlName)
            userControl.ID = e.PageView.ID & "_userControl"
            e.PageView.Controls.Add(userControl)
        End Sub
     
        Private Sub AddPageView(ByVal tab As RadTab)
            Dim pageView As RadPageView = New RadPageView
            pageView.ID = tab.Text
            RadMultiPage1.PageViews.Add(pageView)
            pageView.CssClass = "pageView"
            tab.PageViewID = pageView.ID
        End Sub
     
        Protected Sub RadTabStrip1_TabClick(ByVal sender As Object, ByVal e As RadTabStripEventArgs) Handles RadTabStrip1.TabClick
            AddPageView(e.Tab)
            e.Tab.PageView.Selected = True
        End Sub
    <telerik:RadTabStrip ID="RadTabStrip1" OnClientTabSelecting="onTabSelecting" Orientation="HorizontalTop"
                    runat="server" SelectedIndex="0" MultiPageID="RadMultiPage1">               
                </telerik:RadTabStrip>
     
    <telerik:RadMultiPage ID="RadMultiPage1" runat="server">
                     
                </telerik:RadMultiPage>
               

    Actually I want to tabs to display .ascx pages.
    I am using RadScriptManager from my masterPage which should be a problem I guess.
  7. Answer
    Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 31 Oct 2012 Link to this post

    Hello Aamir,

    If I had correctly understood your scenario, you have issues adding UserControls in the PageViews of the RadTabStrip control. If so, please find the attached sample, where I demonstrate you how to implement the desired functionality. Please correct me if I had misunderstood your scenario.


    Greetings,
    Nencho
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  8. Aamir
    Aamir avatar
    18 posts
    Member since:
    Nov 2010

    Posted 09 Nov 2012 Link to this post

    Thank you very much Nencho :)
  9. Mariella
    Mariella avatar
    7 posts
    Member since:
    Nov 2011

    Posted 15 Jan 2013 Link to this post

    Hello Necho,

    I am having similar problem... but my issue is how to make this code inside of a ASCX page work. The ContentURL is not displaying the page...

     

    <<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MainPortal.ascx.cs" Inherits="Greenwich.layouts.Sublayouts.GreenwichWWW.GreenwichConnect.MainPortal" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <div class="exampleWrapper">
                <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPagetab"
                    Orientation="HorizontalTop" ShowBaseLine="true">
                    <Tabs>
                        <telerik:RadTab Text="MyApps" Selected="true">
                        </telerik:RadTab>
                        <telerik:RadTab Text="MyDocs">
                        </telerik:RadTab>
                        <telerik:RadTab Text="My Profile">
                        </telerik:RadTab>
                    </Tabs>
                </telerik:RadTabStrip>
      
                <telerik:RadMultiPage ID="RadMultiPagetab" runat="server">
                    <telerik:RadPageView ID="PageView1" runat="server" ContentUrl="http://www.telerik.com" Selected="true">
                    </telerik:RadPageView>
                    <telerik:RadPageView ID="PageView2" runat="server">
                        ..... some controls---------------
                    </telerik:RadPageView>
                    <telerik:RadPageView ID="PageView3" runat="server">
                        ----some controls---------------
                    </telerik:RadPageView>
                </telerik:RadMultiPage>
            </div>

    Thanks,
    Mariella.
  10. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 15 Jan 2013 Link to this post

    Hi,

    I suppose you want to set the corresponding PageView to the RadTab. Try the following code snippet which worked as expected at my end.

    ASPX:
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPagetab" Orientation="HorizontalTop" ShowBaseLine="true">
        <Tabs>
            <telerik:RadTab Text="MyApps" Selected="true" PageViewID="PageView1">
            </telerik:RadTab>
            <telerik:RadTab Text="MyDocs" PageViewID="PageView2">
            </telerik:RadTab>
            <telerik:RadTab Text="My Profile" PageViewID="PageView3">
            </telerik:RadTab>
        </Tabs>
    </telerik:RadTabStrip>
    <telerik:RadMultiPage ID="RadMultiPagetab" runat="server">
        <telerik:RadPageView ID="PageView1" runat="server" ContentUrl="http://www.telerik.com" Selected="true">
        </telerik:RadPageView>
        <telerik:RadPageView ID="PageView2" runat="server">
            ..... some controls---------------
        </telerik:RadPageView>
        <telerik:RadPageView ID="PageView3" runat="server">
            ----some controls---------------
        </telerik:RadPageView>
    </telerik:RadMultiPage>

    Please elaborate your scenario if it doesn't helps.

    Regards,
    Princy.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017