<asp:Repeater ID="rep1" runat="server" >
<ItemTemplate>
<%if ((Eval("Member_ID").ToString()) == Session["StuID"].ToString()) {%>
...some code
but when I run the code this error message appears:
System.InvalidOperationException: 'Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.' This exception was originally thrown at this call stack: [External Code] ASP.adminsection_empchat_aspx.__Render__control4(System.Web.UI.HtmlTextWriter, System.Web.UI.Control) in EmpChat.aspx [External Code]