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()
    
  • DefaultVB.aspx
  • DefaultVB.aspx.vb
  • styles.css
  • Menu.xml
<%@ Page Language="vb" CodeFile="DefaultVB.aspx.vb" AutoEventWireup="false" Inherits="Menu.Examples.Programming.XmlDefinition.DefaultVB" %>

<!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