How to pass other than a primitive type as a property of a custom control?

Discussion in 'ASP .Net' started by Henri, May 17, 2004.

  1. Henri

    Henri Guest

    I would like to do sth like this:

    Page:
    <MyNS:MyControl runat="server" Id="MyId" List="1,2,5,6" />


    Code:
    Public Property List As ArrayList
    Get
    If ViewState("List") Is Nothing Then
    Return new ArrayList()
    End If
    Return CType(ViewState("List"), ArrayList) 'Is This possible?
    End Get
    Set
    ViewState("List") = .... 'What can I do here if I want to parse the
    received string to an ArrayList???
    End If
    End Set
    End Property

    There are lots of examples of String properties on the Web, but nothing
    about Objects...
    Thanks
    Henri, May 17, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Earl Teigrob
    Replies:
    4
    Views:
    501
    Earl Teigrob
    May 19, 2004
  2. DaKoadMunky
    Replies:
    8
    Views:
    3,310
    Leor Zolman
    May 14, 2004
  3. Replies:
    7
    Views:
    601
    Victor Bazarov
    May 9, 2005
  4. Lee Harr
    Replies:
    1
    Views:
    259
    Lee Harr
    May 8, 2004
  5. Daniel Pitts
    Replies:
    7
    Views:
    474
Loading...

Share This Page