I'm trying to make a user control based on a dropdownlist. I want to be able to set the source for the control in my aspx page like this
Code:
<Prefix:Test DataSource="<%# CreateTimesList(0,48, true) %>" id=Test1 runat="server" />
CreateTimesList is just a function that returns an ArrayList
Using
Code:
<asp:dropdownlist DataSource="<%# CreateTimesList(0,48, true) %>" id=Test1 runat="server" />
works fine.
I'm using the following code to get and set properties
Code:
Property DataSource() As Object
		Get
			Return _DataSource
		End Get
		Set
			_DataSource = value
			ddl.DataSource = _DataSource
			Response.Write ("<br>datasourceset")
		End Set
	End Property
 
	Property CustomProp() As String
		Get
			Return _CustomProp
		End Get
		Set
			_CustomProp = value
						Response.Write ("<br>custompropset")
		End Set
	End Property
I can set the CustomProp fine and get the custompropsetmessage when i load the page.

When i try set the datasource however the set method never gets called. Is there some rule saying I can't have an Object as a property or something??

Has anyone got any ideas?

Thanks,
Pete