Ok, this is a tricky one and has been bugging me now for a day and a half. Please read carefully as it is easy to misunderstand.
I have seen the post http://stackoverflow.com/questions/123616/how-do-you-build-an-asp-net-custom-control-with-a-collection-property and I realise that is a solution, however, it relies on the fact that the PersonName class is in the same assembly.
I also realise that what I have found may be a bug and something that just will not work, but here goes with the explanation in the hopes that someone may know how to achieve this:
I want the same thing as is described in the post linked above, however, the sub-properties are in a different assembly, and it seems that when using Intellisense at least, it doesn't know what to do if the class is in another assembly. To help explain my reasoning for this my example is:
I have a server control library which has all of my controls in it, and I have a custom base library which has many generic bases, including a server control base which contains a DataSource property. This property provides a class which allows you to specify either the table name or stored procedure name to execute when the control requires data. This DataSource class has a property named Parameters which I'd like to use as a collection of parameters to use with the stored procedure when it is called. The problem is that because the parameter class is in a different namespace and assembly, when using the control in my designer, intellisense just doesn't come up with anything at all. The only way I have managed to get it working is by adding a new @Register line with the same tagprefix but the namespace and assembly of where the parameter class is sitting.
Has anyone got any ideas on how to get around this (other than including the @Register line)?
Thanks in advance.