Results 1 to 3 of 3

Thread: Selecting a class from an object using DropDownList

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2004
    Posts
    14

    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.

  2. #2

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2004
    Posts
    14

    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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width