0

I've Creted Composite control which has FormView and two custom server control. The Control renders correctly. now when i add control to page from toolbox i want to edit Composite Control's FormView ItemTemplte as we edit ItemTemplate for generic formview (by clicking small arrow head).

any adeas?

r.zarei
  • 1,261
  • 15
  • 35

1 Answers1

0

When you create an instance of the FormView, programmatically add the templates to the FormView before adding it to the CompoisteControl in the CreateControlHierarchy() method.

Here is an extensive example

TheGeekYouNeed
  • 7,509
  • 2
  • 26
  • 43
  • i want to reuse component in multiple pages and connect FormView to different data sources. i.e each instance of it can have different Item Templates. by adding templates in CreateControlHierarchy() method it were fixed and can't modified in page level. – r.zarei May 19 '11 at 06:36
  • Ok, so what is stopping you? Perhaps you need to look more into software architecture topics to figure out how you need to approach your problem? – TheGeekYouNeed May 19 '11 at 17:50