|
Rank: Newbie Groups: Member
Joined: 10/30/2009 Posts: 2
|
I am using the dropdownlist with the toolbar control. I have created a context menu that is connected via the dropdownmenuid property. I am trying to dynamically add menu items in the code behind page_init event. The problem is when I try to set the menu item's text property it will not accept a string. Can you please provide an example of how to set the text property of the menuitem object in the code behind page. Thanks,
Code: Visual Basic.NET
Dim mi As EO.Web.MenuItem = Nothing
For Each key As Integer In Item.Keys
mi = New EO.Web.MenuItem()
With mi
.ItemID = CStr(key)
.Text = CType(Item(key).Desc, EO.Web.NavigationItemText) 'doesn’t work
.Text = Item(key).Desc 'doesn’t work
End With
Me.Menu1.Items(0).SubMenu.Items.Add(mi)
Next
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You will need to do .Text.Html = "something"
Thanks
|
|
Rank: Newbie Groups: Member
Joined: 10/30/2009 Posts: 2
|
Worked like a champ, thanks...
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Great. Glad that it worked for you!
|
|