daviesgroup
asked on
Dynamic Menu in Windows C# Application
In my c# windows application, I have created 10 drop down menu's, mnuFile0, mnuFile1, ...., mnuFile9. I've read in a field from a db and wish to update the .Text items of the drop down menu's to the contents of the db field. In action script, this would be the way (using eval command):
for (i=0; i<9; i++) {
MenuItem mnu = Eval("mnuFile" + i);
mnu.Text = DBRecordField[i];
mnu.Visible = True;
}
After spending some time researching FindControl(ID) only to realize this was for web pages, is there a C# windows application equivelant to Eval? Somehow I get the feeling there isn't, is there another way?
Many thanks.
for (i=0; i<9; i++) {
MenuItem mnu = Eval("mnuFile" + i);
mnu.Text = DBRecordField[i];
mnu.Visible = True;
}
After spending some time researching FindControl(ID) only to realize this was for web pages, is there a C# windows application equivelant to Eval? Somehow I get the feeling there isn't, is there another way?
Many thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.