You need to get into the proper mindset for developing webforms. Rather than add logic to the aspx page you simply add the controls and using the code-behind to manipulate these controls. So what I'd do is add both the LinkButton controls but set their visibility to false;
<asp:Repeater ID="MyRepeater" runat="server">
<ItemTemplate>
<asp:LinkButton ID="lbtnAccept" CommandName="AcceptInterest" Visible="false" runat="server">ACCEPT</asp:LinkButton>   
<asp:LinkButton ID="lbtnReject" CommandName="RejectInterest" Visible="false" runat="server">REJECT</asp:LinkButton>
</ItemTemplate>
</asp:Repeater>
Then use the ItemDataBound event in the code-behind page to decide when the controls are shown
protected void Page_Load(object sender, EventArgs e)
{
List<MyData> data = new List<MyData> { new MyData { InterestStatus = "ABC" }, new MyData { InterestStatus="Pending" } };
MyRepeater.DataSource = data;
MyRepeater.ItemDataBound += MyRepeater_ItemDataBound;
MyRepeater.DataBind();
}
protected void MyRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
{
MyData rowData = (MyData)e.Item.DataItem;
if (rowData.InterestStatus == "Pending")
{
LinkButton lbtnAccept = (LinkButton)e.Item.FindControl("lbtnAccept");
LinkButton lbtnReject = (LinkButton)e.Item.FindControl("lbtnReject");
lbtnAccept.Visible = true;
lbtnReject.Visible = true;
}
}
}
You can also use that event to populate the controls if their data needs any kind of logic to set.
If you're using a DataTable then the code would be like below
protected void Page_Load(object sender, EventArgs e)
{
DataTable data = new DataTable();
data.Columns.Add("ID", typeof(int));
data.Columns.Add("Name", typeof(string));
data.Columns.Add("InterestStatus", typeof(string));
data.Rows.Add(1, "Joe", "Approved");
data.Rows.Add(2, "Dave", "Pending");
MyRepeater.DataSource = data;
MyRepeater.ItemDataBound += MyRepeater_ItemDataBound;
MyRepeater.DataBind();
}
protected void MyRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
{
DataRowView rowData = (DataRowView)e.Item.DataItem;
if ((string)rowData["InterestStatus"] == "Pending")
{
LinkButton lbtnAccept = (LinkButton)e.Item.FindControl("lbtnAccept");
LinkButton lbtnReject = (LinkButton)e.Item.FindControl("lbtnReject");
lbtnAccept.Visible = true;
lbtnReject.Visible = true;
}
}
}