Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to pass other than a primitive type as a property of a custom control?

Thread Tools

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

Posts: n/a
I would like to do sth like this:

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

Public Property List As ArrayList
If ViewState("List") Is Nothing Then
Return new ArrayList()
End If
Return CType(ViewState("List"), ArrayList) 'Is This possible?
End Get
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...

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Default primitive values from primitive Class<?> object. Daniel Pitts Java 7 10-23-2008 04:30 PM
casting primitive type to user-defined type works in usage C++ 2 04-15-2006 05:37 AM
Primitive vs. non-primitive l-value C++ 7 05-09-2005 02:52 PM
Return by value -- primitive type vs class type DaKoadMunky C++ 8 05-14-2004 09:46 PM
setting property to type other than what is given Lee Harr Python 1 05-08-2004 09:31 PM