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

Populating from XML

  • Mail message
    • Mail message
    • Document
    • Report
    • Drawing
    • Chart
  • Save
  • Load
  • Left
  • Center
  • Right
  • Justify
  • Text style
    • Bold
    • Italic
    • Underline
  • Telerik Login

You can seamlessly populate RadToolBar from XML.

  • Loading from XML file
    RadToolBar1.LoadContentFile("~/ToolBar/Examples/PopulatingWithData/PopulatingFromXml/ToolBar.xml");
    
  • Loading from XML string
    RadToolBar1.LoadXml("<ToolBar><Button Text="Home" NavigateUrl="~/Default.aspx" /></ToolBar>");
    

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

  • C#
    string xml = RadToolBar1.GetXml();
    
  • VB
    Dim xml as String = RadToolBar1.GetXml()
    
  • DefaultCS.aspx
  • DefaultCS.aspx.cs
  • styles.css
  • ToolBar.xml
<%@ Page AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="Telerik.Web.Examples.ToolBar.PopulatingWithData.PopulatingFromXml.DefaultCS"Language="c#"  %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link rel="stylesheet" type="text/css" href="styles.css" />
</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">
        <telerik:RadToolBar RenderMode="Lightweight" runat="server" ID="RadToolBar1" EnableRoundedCorners="true" EnableShadows="true">
        </telerik:RadToolBar>
    </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance