Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I reference the menu item I added at run-time?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Menus
Divers
Thread ID:
00980910
Message ID:
00980974
Vues:
51
Dawa,
Thanks for the reply, but that will not work either (I tried it just to be sure).
MenuItems[ThisMustResolveToAnInteger]
MenuItemsCollection does not have any overloads that accepts a string (infact it doesn't have any overloads, it only accepts an int)

Einar

>Try this:
>
>System.Windows.Forms.MenuItem oItem;
>oItem = this.myMenuItem.MenuItems["Einar_0"];
>
>oItem should give you access to that item.
>
>>No I didn't try it until I read your message, now that I have tried it I can tell you that it didn't work. I got the following compile time error: MenuItems denotes a property where a method was expected.
>>I also tried: , but it can't convert from string to int.
>>
>>Any other thoughts?
>>
>>Einar
>>
>>
>>>
>>>Did you try:
>>>
>>>this.myMenuItem.MenuItems("Einar_0")
>>>
>>>BOb
Semper ubi sub ubi.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform