Selecting a class from an object using DropDownList
Hello,
I have a DLL which contains 3 different classes. These classes also contain events.
Code:
} Class A
DLL } Class B
} Class C
I also have a DropDownList control which allows a user to select from 3 different values, each of which corresponds to one of the 3 classes in the DLL.
How would I go about doing this since .NET will only allow me to create an object with events publicly.
So I can't do:
Code:
If drpType.SelectedValue = 0 Then
Dim WithEvents objDLL as New DLL.ClassA
Elseif drpType.SelectValue = 1 Then
Dim WithEvents objDLL as New DLL.ClassB
Else
Dim WithEvents objDLL as New DLL.ClassC
End If
Any ideas how I could get around this?
Cheers.
Re: Selecting a class from an object using DropDownList
What's wrong with creating them publicly?
Woof
Re: Selecting a class from an object using DropDownList
Quote:
Originally Posted by Wokawidget
What's wrong with creating them publicly?
Woof
How would I go about creating them publicly using the dropdownlist method?