S
Samuel
Hi everyone,
I am new to this ASP.NET 2.0 feature. I am having a hard time getting the
databinding syntax evaluated in my template for a control that inherits the
CompositeDataboundControl that is new to ASP.NET 2.0. I don't have such
problem with a control that inherits from CompositeControl. The template
loads fine, but it is just that the databinding syntax won't evaluate. Here
is how I want it done:
<cc2:TableHeader2 ID="TableHeader2" runat="server"
EnableViewState="false" AutoPostBack="false" >
<ButtonSeparatorTemplate><hr width="<%# Container.SeparatorWidth
%>" /></ButtonSeparatorTemplate>
</cc2:TableHeader2>
As you can see from the above code, there is a template called
ButtonSeparatorTemplate. On the HTML source, I only get <hr width="" />
without the Container.SeparatorWidth being evaluated.
In this class, I override the CreateChildControls (IEnumerable, Boolean)
function and I don't know what I missed. There is not such problem when I
inherits the more general CompositeControl.
Thanks!
I am new to this ASP.NET 2.0 feature. I am having a hard time getting the
databinding syntax evaluated in my template for a control that inherits the
CompositeDataboundControl that is new to ASP.NET 2.0. I don't have such
problem with a control that inherits from CompositeControl. The template
loads fine, but it is just that the databinding syntax won't evaluate. Here
is how I want it done:
<cc2:TableHeader2 ID="TableHeader2" runat="server"
EnableViewState="false" AutoPostBack="false" >
<ButtonSeparatorTemplate><hr width="<%# Container.SeparatorWidth
%>" /></ButtonSeparatorTemplate>
</cc2:TableHeader2>
As you can see from the above code, there is a template called
ButtonSeparatorTemplate. On the HTML source, I only get <hr width="" />
without the Container.SeparatorWidth being evaluated.
In this class, I override the CreateChildControls (IEnumerable, Boolean)
function and I don't know what I missed. There is not such problem when I
inherits the more general CompositeControl.
Thanks!