I have asp master page with menu control like this:
MenuItem1
MenuSubItem1
MenuSubItem2
MenuItem2
MenuSubItem3
MenuSubItem4
I want some menu items and subitems to be disabled or enabled. I have code like this:
For Each menu In Menu1.Items
If menu.Value = "E" Then
menu.Enabled = True
ElseIf menu.Value <> "" Then
For i = 0 To UBound(x)
If menu.Value = CStr(x(i)) Then
menu.Enabled = True
Else
menu.Enabled = False
End If
Next i
End If
Next
But problem is that Menu1.Items consider only MenuItem1 and MenuItem2, and MenuSubItems are not in this collection.
Which kind of collection has both MenuItems and MenuSubItems?
MenuItem1
MenuSubItem1
MenuSubItem2
MenuItem2
MenuSubItem3
MenuSubItem4
I want some menu items and subitems to be disabled or enabled. I have code like this:
For Each menu In Menu1.Items
If menu.Value = "E" Then
menu.Enabled = True
ElseIf menu.Value <> "" Then
For i = 0 To UBound(x)
If menu.Value = CStr(x(i)) Then
menu.Enabled = True
Else
menu.Enabled = False
End If
Next i
End If
Next
But problem is that Menu1.Items consider only MenuItem1 and MenuItem2, and MenuSubItems are not in this collection.
Which kind of collection has both MenuItems and MenuSubItems?