I have this userControl
which contains ListBox
. I want to access that ListBox
from another userControl
.
For example:
UserControl1.ListBox1.Items.Count;
I have this userControl
which contains ListBox
. I want to access that ListBox
from another userControl
.
For example:
UserControl1.ListBox1.Items.Count;
Make a property of
ListBox
in your firstusercontrol
and get that likeNow access the ListBox from other usercontrol like that
Add A Public Property ItemsCount in your user control
to access the whole listbox