|
Language: vb.net 2003
For example, one string in my database is "ItemNumber"
And this string happens to be the name of a MenuItem
After I get it out of the database, how do I associate it with MenuItem, for example, I want this Menuitem.Enable = False (normal case, ItemNumber.Enable = False)
But now ItemNumber is a string, is there any way to do it
I was prompted to do this
Dim btn As Button = CType (Me.Controls.Find ("ItemNumber", True) (0), Button)
If Not (btn Is Nothing) Then
btn.Enabled = False
End If
But Me.Controls.Find syntax error |
|