Author: abhinavpratap | Posted on: 7/10/2010 12:52:29 PM | Views : 256

I have a dynamic accordion on a page. Set its datasource to an object of paged data source.The user control is in the accordions content template. When i was writing code the properties were showing but after giving the values of databases as
<ContentTemplate>
<uc:UserControl1  runat="server" Property1='<%#DataBinder.Eval(Container.DataItem,"columname1")%>' Property2='<%#DataBinder.Eval(Container.DataItem,"columname2")%>'  ></uc:UserControl1>
</ContentTemplate>
but the values shows null, these properties are shown as textboxes text property by user control.
MoreOver when I checked the values of database Items.So i made a textbox instead of usercontrol here as
<asp:TextBox ID="txtTest" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Columname1")%>'></a ...

Go to the complete details ...