Myself and a colleague are attempting to mimic thefunctionality of the ASP.Net 2.0 Login control. Essentially, we would like to have the ability within our CompositeControl/CompositeControlDesigner to have and Action or Verb in the control’s smart tag titled ‘Convert to Template’ which actually converts the whole control, including it’s child controls to templated mode.
Do this in the Login control, and you’ll see the source change to include a <LayoutTemplate> tag with inner html made up of a layout table, and child textbox/button controls (along with labels and validators. You can then edit the html as you see fit (eg. Convert to div tag layout), but if you remove or rename the key child controls you’ll get a runtime error where the control is attempting a FindControl.
Ideally, we would like an example to achieve this – can anyone help?
We have been searching (in vain) for a solution that matches this, but a full trawl of the net only reveals solutions which are close but not exactly the full functionality of the login control. For example - to me, this solution does not suffice, it is more of a way of enabling templates within your control that the developer can add to.