New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

XML Definition

  • File
    • New
    • Open
      • Project
      • Project From Web
      • File
      • File from Web
    • PostBack Item
    • ToolTip Item
    • Add Existing Item
    • Add Project
  • Edit
    • Undo
    • Redo
    • Cut
    • Copy
    • Paste
  • View
    • Open
    • Open With
    • Toolbox
    • Resource View
    • Properties
  • Help

You can seamlessly populate RadMenu from XML.

  • Loading from XML file
    RadMenu1.LoadContentFile("~/Menu/Data/OfficeMenu.xml");
    
  • Loading from XML string
    RadMenu1.LoadXml("<Menu><Group Flow="Horizontal"><Item  Text="File" Key="F" /></Group></Menu>");
    

You can also retrieve the current RadMenu structure in XML format:

  • C#
    string xml = RadMenu1.GetXml();
    
  • VB
    Dim xml as String = RadMenu1.GetXml()
    
  • DefaultCS.aspx
  • DefaultCS.aspx.cs
  • styles.css
  • Menu.xml
<%@ Page Language="c#" CodeFile="DefaultCS.aspx.cs" AutoEventWireup="true" Inherits="Menu.Examples.Programming.XmlDefinition.DefaultCS" %>

<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="stylesheet" />
</head>

<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />

    <div class="demo-container size-thin">
        <telerik:RadMenu RenderMode="Lightweight" ID="RadMenu1" runat="server" EnableRoundedCorners="true" EnableShadows="true">
        </telerik:RadMenu>
    </div>

    </form>
</body>
</html>

Support & Learning Resources

Find Assistance