vb.net - Read combo selectvalue with Forms.Control -
in vb.net read textbox line of code:
me.groupbox1.controls("textbox" & i).text
but if want read combobox with:
me.groupbox1.controls("combobox" & i).selectedvalue
i have error because selectedvalue
not member of system.windows.forms.control
what can read combobox dynamically?
you need cast control combobox
, can read properties normal:
directcast(me.groupbox1.controls("combobox" & i), combobox).selectedvalue
Comments
Post a Comment