A
Arnaud PICHERY
Hi !
I am reposting the following question as it went under another topic (don't
know exactly why)
I have a design-time problem that puzzle me...
I am building a WebControls library and one of the control inherits from
Chart which is located in the DundasWebChart WebControls library.
When I adds a legend to this charting control its serialized form is similar
to something like this:
<myCompany:Chart runat=server ...>
<Legend>
<dcwc:LegendText ... />
</Legend>
</myCompany>
"myCompany" is the TagPrefix of my WebControls library, and "dcwc" the
TagPrefix of DundasWebChart.
The problem is that when I drag'n'drop my control from the ToolBox, Visual
Studio .NET only adds one Register directive, the one
for my WebControls library.
<%@ Register TagPrefix="myCompany" Namespace="MyCompany.WebControls"
Assembly="MyCompany.WebControls" %>
But I definitely need the Register directive for the Dundas WebControls
library in order for my control to work (both at design-time
and runtime).
The question is: Is there a way for me to add the Register directive for the
Dundas WebControls library programmatically? Inside the
ControlDesigner.OnSetParent method for example?
I know how to retrieve the registered directives using
IWebFormReferenceManager.GetDirectives() but can't find a way to add a
directive.
In the same way, is there a way to access and modify to the content of the
aspx file at design-time?..To add a Register Directive for example...:O)
Thanks in advance,
Arnaud :O)
I am reposting the following question as it went under another topic (don't
know exactly why)
I have a design-time problem that puzzle me...
I am building a WebControls library and one of the control inherits from
Chart which is located in the DundasWebChart WebControls library.
When I adds a legend to this charting control its serialized form is similar
to something like this:
<myCompany:Chart runat=server ...>
<Legend>
<dcwc:LegendText ... />
</Legend>
</myCompany>
"myCompany" is the TagPrefix of my WebControls library, and "dcwc" the
TagPrefix of DundasWebChart.
The problem is that when I drag'n'drop my control from the ToolBox, Visual
Studio .NET only adds one Register directive, the one
for my WebControls library.
<%@ Register TagPrefix="myCompany" Namespace="MyCompany.WebControls"
Assembly="MyCompany.WebControls" %>
But I definitely need the Register directive for the Dundas WebControls
library in order for my control to work (both at design-time
and runtime).
The question is: Is there a way for me to add the Register directive for the
Dundas WebControls library programmatically? Inside the
ControlDesigner.OnSetParent method for example?
I know how to retrieve the registered directives using
IWebFormReferenceManager.GetDirectives() but can't find a way to add a
directive.
In the same way, is there a way to access and modify to the content of the
aspx file at design-time?..To add a Register Directive for example...:O)
Thanks in advance,
Arnaud :O)