i try to use userControl to display SqlDataReader data.
in the main page
public SqlDataReader Data2;
...
<uc1:WebUserControl ID="WebUserControl1" RData1="<%=Data2 %>" runat="server" />
and in the userControl
Repeater1.DataSource = RData1;
Repeater1.DataBind();
<asp:Repeater ID="Repeater1" runat="server"> <ItemTemplate>
<div class="row"> <b>
<%#DataBinder.Eval(Container.DataItem,
"replay_subject")%></b><br />
<%#DataBinder.Eval(Container.DataItem,
"replay_text")%><hr/> </div>
</ItemTemplate>
</asp:Repeater>
But i keep getting this error
Cannot create an object of type 'System.Data.SqlClient.SqlDataReader' from its string representation '<%=Data2 %>' for the 'RData1' property.