I have built a composite control library that are composed of common asp.net controls with some business specific functionality. I also added "container" controls to add a standard to the format of how the controls are layed out in the markup (i.e. <Form><Row><Column><controls></Column><Column><controls></Column></Row></Form>.
Where Form, Row, and Column are the containers and controls are the controls from the composite library). The controls and the "container" controls all work great at run time.
The Form container has a List<Row> Rows property set and the ParseChildren(true, "Rows") attribute set.
The Row container has a List<Column>Columns property set and the ParseChildren(true, "Columns") attribute set.
The Column container has no container for children because it should be able to handle anything put within it's tags so it's ParseChildren(false) attribute set.
All three of those have ToolBoxItem set to true and their respective markup set for the ToolBoxData attribute.
Problem:
1) I can add my control library to the toolbox in vs 2010, but I can't drag and drop any of the controls on to the page or to the markup (and, as a result, can't get the control registration added on the page unless it's done manually).
2) The IntelliSense for the controls works perfectly when the project that is using them is in the same solution as the control library, but does NOT work when it is a project on it's own and the reference to the controls is added.
Question:
Anybody, off the top of their head, think of any reasons why either of these things would be happening?
So, I figured out the answer to problem #1. Each of my individual controls was inheriting a basecompositecontrol (that inherited compositecontrol). The basecompositecontrol had ToolBoxItem(false) attribute set. When I removed that attribute from the control,
the drag and drop was allowed again.
2) The IntelliSense for the controls works perfectly when the project that is using them is in the same solution as the control library, but does NOT work when it is a project on it's own and the reference to the controls is added.
Well, can you show us your full codes of your Customized Control and how did you use that you cannot get any intellisense?
jcheriat
Member
247 Points
67 Posts
Design Time Issues
Nov 14, 2012 08:14 PM|LINK
Setup:
I have built a composite control library that are composed of common asp.net controls with some business specific functionality. I also added "container" controls to add a standard to the format of how the controls are layed out in the markup (i.e. <Form><Row><Column><controls></Column><Column><controls></Column></Row></Form>. Where Form, Row, and Column are the containers and controls are the controls from the composite library). The controls and the "container" controls all work great at run time.
The Form container has a List<Row> Rows property set and the ParseChildren(true, "Rows") attribute set.
The Row container has a List<Column>Columns property set and the ParseChildren(true, "Columns") attribute set.
The Column container has no container for children because it should be able to handle anything put within it's tags so it's ParseChildren(false) attribute set.
All three of those have ToolBoxItem set to true and their respective markup set for the ToolBoxData attribute.
Problem:
1) I can add my control library to the toolbox in vs 2010, but I can't drag and drop any of the controls on to the page or to the markup (and, as a result, can't get the control registration added on the page unless it's done manually).
2) The IntelliSense for the controls works perfectly when the project that is using them is in the same solution as the control library, but does NOT work when it is a project on it's own and the reference to the controls is added.
Question:
Anybody, off the top of their head, think of any reasons why either of these things would be happening?
jcheriat
Member
247 Points
67 Posts
Re: Design Time Issues
Nov 15, 2012 04:23 PM|LINK
So, I figured out the answer to problem #1. Each of my individual controls was inheriting a basecompositecontrol (that inherited compositecontrol). The basecompositecontrol had ToolBoxItem(false) attribute set. When I removed that attribute from the control, the drag and drop was allowed again.
I am still working on resolving issue 2.
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Design Time Issues
Nov 16, 2012 12:10 AM|LINK
Well, can you show us your full codes of your Customized Control and how did you use that you cannot get any intellisense?
Reguards!