Is there a way to dynamically load a page into a panel with RadMenu?

2 posts, 0 answers
  1. David
    David avatar
    10 posts
    Member since:
    Jul 2011

    Posted 06 Oct 2011 Link to this post

    I'm currently trying to get an iFrame to dynamically load pages based upon menu click. I've tried various methods but none want to work. Ideally, though, I'd prefer to have them loaded into a Panel if possible.

    My code at the minute looks like this (obviously it's not complete as I'm only testing things):

    protected void RadMenu1_ItemClick(object sender, Telerik.Web.UI.RadMenuEventArgs e)
         RadMenuItem item = e.Item as RadMenuItem;
         switch (item.Text)
             case "Banners": Panel1.Attributes.Add("src", "~/Banners.aspx");
             case "Categories":
             case "Countries and Counties":
             case "Facilities":
             case "Links Manager":
             case "Login Security Questions":
             case "Regions":
             case "Vouchers":
             case "User Accounts":

    And here's the markup:

    <telerik:RadAjaxPanel runat="server" ID="AjaxPanel" HorizontalAlign="NotSet">
            <table align="center" border="0px" cellpadding="0px" cellspacing="0px">
                        <telerik:RadMenu ID="RadMenu1" runat="server" Skin="Forest" Width="950px" Style="top: 0px;
                            left: 0px" OnItemClick="RadMenu1_ItemClick">
                                <telerik:RadMenuItem runat="server" Owner="RadMenu1" Text="User Accounts" CssClass="left">
                                <telerik:RadMenuItem runat="server" Owner="RadMenu1" Text="System Setup" CssClass="left">
                                        <telerik:RadMenuItem runat="server" Owner="" Text="Banners" CssClass="left">
                                        <telerik:RadMenuItem runat="server" Owner="" Text="Categories" CssClass="left">
                                        <telerik:RadMenuItem runat="server" Owner="" Text="Countries and Counties" CssClass="left">
                                        <telerik:RadMenuItem runat="server" Owner="" Text="Facilities" CssClass="left">
                                        <telerik:RadMenuItem runat="server" Owner="" Text="Links Manager" CssClass="left">
                                        <telerik:RadMenuItem runat="server" Owner="" Text="Login Security Questions" CssClass="left">
                                        <telerik:RadMenuItem runat="server" Owner="" Text="Regions" CssClass="left">
                                        <telerik:RadMenuItem runat="server" Owner="" Text="Vouchers" CssClass="left">
                <asp:LoginName ID="LoginName1" runat="server" />
                <asp:LoginStatus ID="LoginStatus1" runat="server" />
            <div class="center_panel">
                <iframe id="Panel1" width="100%" runat="server"></iframe>
        <telerik:RadAjaxManager runat="server">
                <telerik:AjaxSetting AjaxControlID="RadMenu1">
                        <telerik:AjaxUpdatedControl ControlID="RadMenu1" />
  2. Peter
    Peter avatar
    6637 posts

    Posted 11 Oct 2011 Link to this post

    Hi David,

    You can use the approach from this tutorial and handle RadMenu's OnClientItemClicking. Here is the help topic on RadMenuItem client object.

    Kind regards, Peter
    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
Back to Top