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

RADMENU in Master Page

1 Answer 341 Views
Menu
This is a migrated thread and some comments may be shown as answers.
lax
Top achievements
Rank 1
lax asked on 19 Feb 2009, 11:55 PM
Hi All,
I have an web application where in i am using a master page and all the pages uses this master page. All the content pages have <form runat=server> tag and other controls in the form.

Now I want to use rad menu in top section of master page and I am not able to since I need to use scriptmanager and this needs to be under <form runat=server> tag too and all the content pages start in mid section. How can i implement this without changing the content pages.

Appreciate an early response.
Thanks
Laxman

1 Answer, 1 is accepted

Sort by
1
Accepted
Paul
Telerik team
answered on 20 Feb 2009, 07:40 AM
Hello lax,

I'm not sure if your approach is right. Generally, when using masterpage, the body and form tags are defined in the masterpage. In addition, you have contentplaceholders that are used in the content pages. Please revise your application structure.

MasterPage.master
<%@ 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>Untitled Page</title> 
    <asp:ContentPlaceHolder ID="head" runat="server"
    </asp:ContentPlaceHolder> 
</head> 
<body> 
    <form id="form1" runat="server"
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
    </telerik:RadScriptManager> 
    <telerik:RadMenu ID="RadMenu1" runat="server"
        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
        <Items> 
            <telerik:RadMenuItem runat="server" Text="Root RadMenuItem1"
                <Items> 
                    <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 1"
                    </telerik:RadMenuItem> 
                </Items> 
            </telerik:RadMenuItem> 
        </Items> 
    </telerik:RadMenu> 
    <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"
    </asp:ContentPlaceHolder> 
    </form> 
</body> 
</html> 
 

Default.aspx
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" 
    CodeFile="Default.aspx.cs" Inherits="_Default" Title="Untitled Page" %> 
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server"
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"
</asp:Content> 
 


Kind regards,
Paul
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Menu
Asked by
lax
Top achievements
Rank 1
Answers by
Paul
Telerik team
Share this question
or