C
Chris
Ok, so I have this sub I wrote, and I create a new instance of a
UserControl:
ctrlAPs tempctrl = new ctrlAPs();
Now, I would like to be able to use this sub I wrote for more than one
UserControl, so I was trying to do something like this:
private void somesub(UserControl sourcectrl)
{
sourcectrl tempctrl = new sourcectrl();
}
But when I do that, I get the following error on compile:
"The type or namespace name 'sourcectrl' could not be found (are you
missing a using directive or an assembly reference?)"
So, I'm obviously not passing this in right. There has to be a way to
do this, as I do it with panels and other controls. Any help is
appreciated.
UserControl:
ctrlAPs tempctrl = new ctrlAPs();
Now, I would like to be able to use this sub I wrote for more than one
UserControl, so I was trying to do something like this:
private void somesub(UserControl sourcectrl)
{
sourcectrl tempctrl = new sourcectrl();
}
But when I do that, I get the following error on compile:
"The type or namespace name 'sourcectrl' could not be found (are you
missing a using directive or an assembly reference?)"
So, I'm obviously not passing this in right. There has to be a way to
do this, as I do it with panels and other controls. Any help is
appreciated.