Quotes Around Menu Item

2 posts, 0 answers
  1. Steve
    Steve avatar
    9 posts
    Member since:
    Jun 2009

    Posted 20 Aug 2012 Link to this post

    When I create and ItemTemplate for the RadMenu, there are quotes put around the title. For example, Home whould display as "Home".

    DataSource
    <asp:SiteMapDataSource
        ID="SiteMapDataSourceMasterPage"
        runat="server"
        ShowStartingNode="false"
        StartingNodeOffset="0" />

    RadMenu
    <telerik:RadMenu
        ID="RadMenuMasterPage"
        runat="server"
        AllowSorting="True"
        CellSpacing="0"
        DataSourceID="SiteMapDataSourceMasterPage">
     
        <ItemTemplate>
            <div>
                <a href="<%# DataBinder.Eval(Container.DataItem, "url") %>">
                    <%# DataBinder.Eval(Container.DataItem, "description") %>"
                </a>
            </div>
        </ItemTemplate>
     
    </telerik:RadMenu>

    Code Behind Page_Load
    for (int i = 0; i < RadMenuMasterPage.Items.Count; i++)
    {
        RadMenuMasterPage.Items[i].DataBind();
    }

    Thanks!
  2. Kevin
    Kevin avatar
    360 posts
    Member since:
    Jul 2012

    Posted 24 Aug 2012 Link to this post

    Hello Steve,

    Are you asking how to add quotes or why RadMenu is adding quotes when using the ItemTemplate?

    If it's the latter (why quotes are showing up), I noticed in your code that you have a quote on the right of your binding statement for the description field.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top