I currently have a repeater control, and inside the itemtemplate element I have a usercontrol. This usercontrol is displayed correctly, but I'm trying to assign a dataitem to a property in the repeater control.
<asp:Repeater ID="Repeater1" DataSourceID="EntityDataSource" runat="server"> <ItemTemplate> <uc1:Request ID="Request1" runat="server" RequestId='<%# Eval("RequestId") %>' /> </ItemTemplate>
RequestId is just Int32. He just doesn't appoint him.
I can put eval beyond the limits of usercontrol only in itemtemplate, and it correctly outputs the correct id.
If I delete the entire eval and just type in a number, then it works fine.
Any help was appreciated.
[UPDATE]: issue resolved
I used EntityDataSource and it was automatically bound to the repeater. He printed all the information from the database on the screen without any codes. But when I entered the code for Repeater1.DataBind (); he started to work.
I don’t know why, but hey he decided. Now it successfully passes the value. I believe this has something to do with the page life cycle.
Adam pedley
source share