N
~~~ .NET Ed ~~~
Hi,
I have made a web control that has two sorts of items. The first is the
Links property that has a persistence attribute of InnerProperty, the other
is SubLinks with the same attribute. Both are of the same collection type.
The control has its own designer class (although it doesn't render in Design
mode like the others I have done, it
still beats me).
The container web control would be in the aspx page as follows (simplified
way)
<cc1:CtPageHeader .....>
<Links>
<cc1:CtPageHeaderLinkItem LinkURL="url" Text="text"></cc1:MyControlItem>
</Links>
</cc1:CtPageHeader >
When I try to run it I get the following error:
Line 37: <cc1:CtPageHeader id="CtPageHeader1" style="Z-INDEX: 103; LEFT:
24px; POSITION: absolute; TOP: 24px"
Line 38: runat="server" Width="472px"
ConfigPath="e:\WebSites\Config\CtPageHeader.config" EnableViewState="False">
Line 39: <SubLinks>
Line 40: <cc1:CtPageHeaderLinkItem LinkURL="demo.aspx"
LinkItemType="SectionLink" Text="Products"
ID="ctPageHeaderLinkItem1"></cc1:CtPageHeaderLinkItem>
Line 41: <cc1:CtPageHeaderLinkItem LinkURL="about.aspx" Text="About Us"
ID="ctPageHeaderLinkItem2"></cc1:CtPageHeaderLinkItem>
For debugging I tried adding an Add(HtmlGenericControl) overload to the
custom item collection in hopes of catching it (breakpoint) and then reading
the LinkURL & Text attributes of the generic control, but that did not work
as it didn't get there. Where should I be looking? where can I set a
breakpoint for this?
I have made a web control that has two sorts of items. The first is the
Links property that has a persistence attribute of InnerProperty, the other
is SubLinks with the same attribute. Both are of the same collection type.
The control has its own designer class (although it doesn't render in Design
mode like the others I have done, it
still beats me).
The container web control would be in the aspx page as follows (simplified
way)
<cc1:CtPageHeader .....>
</SubLinks></cc1:CtPageHeaderLinkItem>
<Links>
<cc1:CtPageHeaderLinkItem LinkURL="url" Text="text"></cc1:MyControlItem>
</Links>
</cc1:CtPageHeader >
When I try to run it I get the following error:
Line 37: <cc1:CtPageHeader id="CtPageHeader1" style="Z-INDEX: 103; LEFT:
24px; POSITION: absolute; TOP: 24px"
Line 38: runat="server" Width="472px"
ConfigPath="e:\WebSites\Config\CtPageHeader.config" EnableViewState="False">
Line 39: <SubLinks>
Line 40: <cc1:CtPageHeaderLinkItem LinkURL="demo.aspx"
LinkItemType="SectionLink" Text="Products"
ID="ctPageHeaderLinkItem1"></cc1:CtPageHeaderLinkItem>
Line 41: <cc1:CtPageHeaderLinkItem LinkURL="about.aspx" Text="About Us"
ID="ctPageHeaderLinkItem2"></cc1:CtPageHeaderLinkItem>
For debugging I tried adding an Add(HtmlGenericControl) overload to the
custom item collection in hopes of catching it (breakpoint) and then reading
the LinkURL & Text attributes of the generic control, but that did not work
as it didn't get there. Where should I be looking? where can I set a
breakpoint for this?