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

[Solved] Menu will not load page in specified Target Frame

1 Answer 202 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Brad
Top achievements
Rank 1
Brad asked on 07 Oct 2009, 10:28 PM

I am trying to have a RadMenu navigate to a specific page in a specific "frame". Now the frame can be an IFrame or a RadPane, I'm not picky, just needs to work. Is there something obvious here that's preventing it from working?

What's happening is the page is being loaded into a new window.

I am using version 2009.2.821.35


<table width="100%" cellpadding="0" cellspacing="0" border="0">
<

 

tr>

 

 

 

 

    <td></td>

 

 

 

 

    <td>

 

 

 

 

        <

 

telerik:RadMenu ID="RadMenu1" runat="server" Skin="Black" Width="1000px" OnItemClick="RadMenu1_ItemClick">

 

 

 

        <Items>

 

 

 

            <telerik:RadMenuItem runat="server" NavigateUrl="home.aspx" Text="Home" Target="Main">

 

 

 

            </telerik:RadMenuItem>

 

 

 

            <telerik:RadMenuItem runat="server" NavigateUrl="Portfolio.aspx" Text="Portfolio" Target="Main">

 

 

 

            </telerik:RadMenuItem>
        </Items>

 

 

         </

 

telerik:RadMenu>
    </td>
</tr>
 <tr>

 

 

 

 

 

    <td></td>

 

 

 

 

    <td>

 

 

    

 

<iframe id="Main" runat="server" src="Home.aspx" ></iframe>

 

 

 

 

    </td>

 

 

 

 

</tr>
</table>

Thanks,

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 08 Oct 2009, 08:43 AM
Hi Brad,

In order to achieve your goal, you should target the iframe by its name. If it's a RadPane your can target it by its ID then.Please find below your modified code snippet that shows the needed approach.

<form id="form1" runat="server"
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
    </telerik:RadScriptManager> 
    <table width="100%" cellpadding="0" cellspacing="0" border="0"
        <tr> 
            <td> 
            </td> 
            <td> 
                <telerik:RadMenu ID="RadMenu1" runat="server" Skin="Black" Width="1000px" _OnItemClick="RadMenu1_ItemClick"
                    <Items> 
                        <telerik:RadMenuItem runat="server" NavigateUrl="home.aspx" Text="Home" Target="Main"
                        </telerik:RadMenuItem> 
                        <telerik:RadMenuItem runat="server" NavigateUrl="Portfolio.aspx" Text="Portfolio" 
                            Target="Main"
                        </telerik:RadMenuItem> 
                    </Items> 
                </telerik:RadMenu> 
            </td> 
        </tr> 
        <tr> 
            <td> 
            </td> 
            <td> 
                <iframe name="Main" runat="server" src="Home.aspx"></iframe> 
            </td> 
        </tr> 
    </table> 
    </form> 


Kind regards,
Paul
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.
Tags
Menu
Asked by
Brad
Top achievements
Rank 1
Answers by
Paul
Telerik team
Share this question
or