You can use sample code bellow to find out value of field (in this case called 'Name') of document currently processed by repeater and show/hide the custom user control accordingly (in this case show it if name is 'Kentico' and hide it otherwise):
<script runat="server">
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
if (this.Parent is IDataItemContainer)
{
IDataItemContainer cont = this.Parent as IDataItemContainer;
if (cont != null)
{
System.Data.DataRowView drv = (System.Data.DataRowView)cont.DataItem as System.Data.DataRowView;
if (drv != null)
{
this.myUserControl.Visible = (drv["Name"].ToString() == "Kentico");
}
else
{
Response.Write("Error: DataRowView is null");
}
}
else
{
Response.Write("Error: IDataItemContainer is null");
}
}
}
</script>