Weird repeater problem
- by lopkiju
I have a Repeater control in my aspx page:
<asp:Repeater ID="repeater" runat="server" EnableViewState="false">
<ItemTemplate>
<%# Eval("someAttribute") %>
</ItemTemplate>
</asp:Repeater>
On Page_Load I have the following code:
if (String.IsNullOrEmpty((string)Request.QueryString["action"]))
s.OpenConn("SELECT * FROM someTable;");
else
s.OpenConn("SELECT * FROM someTable WHERE id=1;");
if (s.Read())
{
repeater.DataSource = s.GetRead();
repeater.DataBind();
}
The problem is that when I enter ?action=something, data is not displayed on the page.
But if I remove ?action=something, I get all the data.
Am I doing something wrong?