Thanks, that worked in terms of printing the row count, but when it went to redirect (per your example), I got: "Type of conditional expression cannot be determined because there is no implicit conversion between 'void' and 'string'".
What I ended up doing was in the Repeater Layout:
<%@ Control Language="C#" AutoEventWireup="true" Inherits="CMSWebParts_Viewers_Basic_BasicRepeater" CodeFile="~/CMSWebParts/Viewers/Basic/BasicRepeater.ascx.cs" %>
<script runat="server">
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
if(this.DataSourceControl != null)
{
System.Data.DataSet ds = (System.Data.DataSet)this.DataSourceControl.DataSource;
if(!DataHelper.DataSourceIsEmpty(ds))
{
int rowCount = ds.Tables[0].Rows.Count;
if(rowCount == 1)
{
Response.Redirect("~/"+ds.Tables[0].Rows[0]["URLSlug"]);
}
}
}
}
</script>
<asp:PlaceHolder runat="server" ID="plcBasicRepeater" />