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

Quotes Around Menu Item

1 Answer 22 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 20 Aug 2012, 09:04 PM
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!

1 Answer, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 2
answered on 24 Aug 2012, 12:31 PM
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.
Tags
Menu
Asked by
Steve
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 2
Share this question
or