J
James Geurts
Hi all
I have a component that contains the following code
<asp:repeater id="MyRepeater" Runat="server"><ItemTemplate><asp:HyperLink Text='<%# DataBinder.Eval(Container.DataItem, "Name")%>' NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "Path")%>' runat="server"/><MyTag:MyControl Name='<%# DataBinder.Eval(Container.DataItem, "Name")%>' Title='<%# DataBinder.Eval(Container.DataItem, "Title")%>' Path='<%# DataBinder.Eval(Container.DataItem, "Path")%>' runat="server"></MyTag:MyControl></ItemTemplate><SeparatorTemplate><br /></SeparatorTemplate></asp:Repeater
Now the problem that I'm having is that the hyperlink will show up properly, with Text and NavigateUrl properties containing the expected values. The other tag, a custom tag that I use for another custom control, does not contain values for the properties specified.
Now, if I do manually specify property values outside of the repeater, it works as expected:
<MyTag:MyControl Name="TestName" Title="TestTitle Path="TestPath" runat="server"></MyTag:MyControl
So, I'm curious why it is not populating the properties correctly from the repeater control. If I have not supplied enough information and you would like to see actual code, I can do that if it would help
Thank
Jim
I have a component that contains the following code
<asp:repeater id="MyRepeater" Runat="server"><ItemTemplate><asp:HyperLink Text='<%# DataBinder.Eval(Container.DataItem, "Name")%>' NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "Path")%>' runat="server"/><MyTag:MyControl Name='<%# DataBinder.Eval(Container.DataItem, "Name")%>' Title='<%# DataBinder.Eval(Container.DataItem, "Title")%>' Path='<%# DataBinder.Eval(Container.DataItem, "Path")%>' runat="server"></MyTag:MyControl></ItemTemplate><SeparatorTemplate><br /></SeparatorTemplate></asp:Repeater
Now the problem that I'm having is that the hyperlink will show up properly, with Text and NavigateUrl properties containing the expected values. The other tag, a custom tag that I use for another custom control, does not contain values for the properties specified.
Now, if I do manually specify property values outside of the repeater, it works as expected:
<MyTag:MyControl Name="TestName" Title="TestTitle Path="TestPath" runat="server"></MyTag:MyControl
So, I'm curious why it is not populating the properties correctly from the repeater control. If I have not supplied enough information and you would like to see actual code, I can do that if it would help
Thank
Jim