If you want to build your own composite control for ASP.Net and you want to create in such a way that when you set a property in the designer window, the setting is reflected in the aspx code, placing this attribute on each public property is the key:
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]