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?

Reply
Thread Tools

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

 
 
Henri
Guest
Posts: n/a
 
      05-17-2004
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



 
Reply With Quote
 
 
 
Reply

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 xllx.relient.xllx@gmail.com C++ 2 04-15-2006 05:37 AM
Primitive vs. non-primitive l-value richardclay09@yahoo.co.uk 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



Advertisments