Re: populate public property from a function
- From: "Marina Levit [MVP]" <someone@xxxxxxxxxx>
- Date: Thu, 16 Mar 2006 08:44:43 -0500
That depends on what you are trying to do in the first place. You either
want the user to assign a value to the property or you don't and want to
assign the variable a value returned by a function instead.
"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot com> wrote in message
news:%23jldn$HSGHA.224@xxxxxxxxxxxxxxxxxxxxxxx
"myfunction" is in the control.
Yes, I am totally confused on this and really need help.
what should I be doing ?
"Marina Levit [MVP]" <someone@xxxxxxxxxx> wrote in message
news:%236og2UHSGHA.4440@xxxxxxxxxxxxxxxxxxxxxxx
Where is 'myfunction' declared? This looks like a scoping issue.
I am also confused why in the Set for a property, you would completely
ignore the argument and just call a function. Why bother having a Set on
the property to begin with? People are going to be setting the property
to something - but that something will be complete ignored? Very
confusing.
"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot com> wrote in message
news:evc1ARHSGHA.5908@xxxxxxxxxxxxxxxxxxxxxxx
I have a public property in my server control and I want to populate it
with values generated by the control.
When I assign the value of the property to a function in the control,
which creates the values, I get a compilation error that says the
function doesn't have all the other property values to work with.
So, how do I populate the arraylist as a public property, so I can use
it in my web page ?
========== code in use ==========
I create the property wth the webpage by:
...............
Dim arrTempList As New ArrayList()
oThis.myArrayList = arrTempList
..............
I have the the property defined in the control as:
....................
Public arrChartList As Arraylist
Public Property myArrayList As ArrayList
Get
Return arrChartList
End Get
Set
arrChartList = myfunction() '<--builds values for
arraylist
End Set
End Property
......................
.
- References:
- Re: populate public property from a function
- From: Marina Levit [MVP]
- Re: populate public property from a function
- Prev by Date: Re: ClientID problem in Asp.Net 2.0
- Next by Date: Web site not available
- Previous by thread: Re: populate public property from a function
- Next by thread: Number of rows returned from ObjectDataSource.FilterExpression
- Index(es):
Relevant Pages
|