Posted
on Dec 8, 2010
(permalink)
I've got another issue with the sample you've given me...
I have successfully applied the header and content templates and can find them in the object model when the page is posted back, but as part of the header, I want to add a HiddenField control and pass in a value when the template is added. Looking at the code, it jumps from Item.ApplyHeaderTemplate to the InstantiateIn method in the template class, and the signature has changed (ApplyHeaderTemplate doesn't take any parameters, but InstantiateIn takes the container!)
So if I wanted to add a template to the header, which has a HiddenField control and I want to pass the value of the HiddenField control when I add the HeaderTemplate, how would I go about this? What if I wanted to pass in several values to the header template to store a number of different pieces of information there?